Gui: Fix rotation mode for Gesture style

This commit is contained in:
Bas Ruigrok
2024-06-03 22:35:12 +02:00
parent 36a7fd9be4
commit 0001879be0
2 changed files with 33 additions and 3 deletions

View File

@@ -492,9 +492,10 @@ public:
explicit RotateState(my_context ctx):my_base(ctx)
{
auto &ns = this->outermost_context().ns;
ns.setRotationCenter(ns.getFocalPoint());
const auto inventorEvent = static_cast<const NS::Event*>(this->triggering_event())->inventor_event;
ns.saveCursorPosition(inventorEvent);
ns.setViewingMode(NavigationStyle::DRAGGING);
this->base_pos = static_cast<const NS::Event*>(this->triggering_event())->inventor_event->getPosition();
this->base_pos = inventorEvent->getPosition();
if (ns.logging)
Base::Console().Log(" -> RotateState\n");
}