Core: Selection : Add possibility to set the style of selection between normal and greedy

This commit is contained in:
Paddle
2023-09-06 11:03:17 +02:00
committed by wwmayer
parent efc7fd09e4
commit 4293c4a65b
4 changed files with 60 additions and 5 deletions

View File

@@ -743,7 +743,8 @@ SoFCUnifiedSelection::handleEvent(SoHandleEventAction * action)
if (SoMouseButtonEvent::isButtonReleaseEvent(e,SoMouseButtonEvent::BUTTON1)) {
// check to see if the mouse is over a geometry...
auto infos = this->getPickedList(action,!Selection().needPickedList());
if(setSelection(infos,event->wasCtrlDown()))
bool greedySel = Gui::Selection().getSelectionStyle() == Gui::SelectionSingleton::SelectionStyle::GreedySelection;
if(setSelection(infos, event->wasCtrlDown() || greedySel))
action->setHandled();
} // mouse release
}