From d1b3cbed75f19a53d0c52526d9c41dd21d10ba0a Mon Sep 17 00:00:00 2001 From: wmayer Date: Fri, 23 Sep 2016 10:46:54 +0200 Subject: [PATCH] make box selection consistent with single/multi selection --- src/Gui/CommandView.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Gui/CommandView.cpp b/src/Gui/CommandView.cpp index e73924faf..22f0d4fbb 100644 --- a/src/Gui/CommandView.cpp +++ b/src/Gui/CommandView.cpp @@ -2281,6 +2281,12 @@ static void selectionCallback(void * ud, SoEventCallback * cb) App::Document* doc = App::GetApplication().getActiveDocument(); if (doc) { cb->setHandled(); + + const SoEvent* ev = cb->getEvent(); + if (ev && !ev->wasCtrlDown()) { + Gui::Selection().clearSelection(doc->getName()); + } + std::vector geom = doc->getObjectsOfType(); for (std::vector::iterator it = geom.begin(); it != geom.end(); ++it) { Gui::ViewProvider* vp = Application::Instance->getViewProvider(*it);