fixes #0002931: Box select misbehaves with touchpad navigation style

This commit is contained in:
wmayer
2017-09-30 14:55:18 +02:00
parent 0a86d959c0
commit 755cd3bfbd

View File

@@ -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();