From: vsv Date: Thu, 25 Dec 2014 12:38:52 +0000 (+0300) Subject: Analyze Shift press instead of Selection on mouse press X-Git-Tag: V_0.7.0_rc1~44 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1c2273e4fb824d7683f679258b068ccb6ca381cd;p=modules%2Fshaper.git Analyze Shift press instead of Selection on mouse press --- diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index 7b6aea622..403fb7b1f 100644 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -126,19 +126,23 @@ void PartSet_SketcherMgr::onMousePressed(ModuleBase_IViewWindow* theWnd, QMouseE QList aSelected = aSelect->getSelected(); myEditingFeatures.clear(); myEditingAttr.clear(); - if ((aHighlighted.size() == 0) && (aSelected.size() == 0)) { + + bool aHasShift = (theEvent->modifiers() & Qt::ShiftModifier); + QObjectPtrList aSelObjects; + if (aHasShift) + aSelObjects = getSumList(aHighlighted, aSelected); + else { + foreach (ModuleBase_ViewerPrs aPrs, aHighlighted) { + aSelObjects.append(aPrs.object()); + } + } + if ((aSelObjects.size() == 0)) { if (isSketchOpe && (!isSketcher)) // commit previous operation if (!aOperation->commit()) aOperation->abort(); return; } - - QObjectPtrList aSelObjects = getSumList(aHighlighted, aSelected); - //foreach (ModuleBase_ViewerPrs aPrs, aHighlighted) { - // aSelObjects.append(aPrs.object()); - //} - if ((aHighlighted.size() == 1) && (aSelected.size() == 0)) { // Move by selected shape (vertex). Can be used only for single selection foreach(ModuleBase_ViewerPrs aPrs, aHighlighted) {