From: nds Date: Sat, 27 Dec 2014 08:07:50 +0000 (+0300) Subject: The local selection restore for a feature vertex (it is checked on the line feature) X-Git-Tag: V_0.7.0_rc1~32^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8db8a9b06ff448925738cc26021711be40b9daa8;p=modules%2Fshaper.git The local selection restore for a feature vertex (it is checked on the line feature) It blocks updateViewer() during move feature. The block, selection save, move, selection restore, unblock, updateViewer. Also it corrects the XGUI_Workshop to do not deactivate current object if the current operation is edit. --- diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index b4a44f8b3..52b1581a8 100644 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -275,30 +275,22 @@ void PartSet_SketcherMgr::onMouseMoved(ModuleBase_IViewWindow* theWnd, QMouseEve foreach(FeaturePtr aFeature, myEditingFeatures) { std::shared_ptr aSketchFeature = std::dynamic_pointer_cast(aFeature); - if (aSketchFeature) { + if (aSketchFeature) { // save the previous selection - QIntList anActivatedModes; - ResultPtr aResult = aSketchFeature->firstResult(); - aDisplayer->getModesOfActivation(aResult, anActivatedModes); - std::list aSelectedAttributes; getCurrentSelection(aSketchFeature, myCurrentSketch, aWorkshop, aSelectedAttributes); // save the previous selection: end aSketchFeature->move(dX, dY); - // TODO: the selection restore should be after the AIS presentation is rebuilt Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_MOVED)); Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_UPDATED)); - // restore the previous selection - //aResult = aSketchFeature->firstResult(); - // aDisplayer->activate(aResult, anActivatedModes); + // restore the previous selection SelectMgr_IndexedMapOfOwner anOwnersToSelect; getSelectionOwners(aSketchFeature, myCurrentSketch, aWorkshop, aSelectedAttributes, anOwnersToSelect); - aConnector->workshop()->selector()->setSelectedOwners(anOwnersToSelect, false); // restore the previous selection }