From 755cd3bfbda380ae1a6e3988ff85ccc3b333d8ef Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 30 Sep 2017 14:55:18 +0200 Subject: [PATCH] fixes #0002931: Box select misbehaves with touchpad navigation style --- src/Gui/CommandView.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Gui/CommandView.cpp b/src/Gui/CommandView.cpp index 68f439c9a7..3276f339f6 100644 --- a/src/Gui/CommandView.cpp +++ b/src/Gui/CommandView.cpp @@ -2538,6 +2538,13 @@ void StdBoxSelection::activated(int iMsg) if (view) { View3DInventorViewer* viewer = view->getViewer(); if (!viewer->isSelecting()) { + // #0002931: Box select misbehaves with touchpad navigation style + // Notify the navigation style to cleanup internal states + int mode = viewer->navigationStyle()->getViewingMode(); + if (mode != Gui::NavigationStyle::IDLE) { + SoKeyboardEvent ev; + viewer->navigationStyle()->processEvent(&ev); + } viewer->startSelection(View3DInventorViewer::Rubberband); viewer->addEventCallback(SoMouseButtonEvent::getClassTypeId(), selectionCallback); SoNode* root = viewer->getSceneGraph();