From 8db8a9b06ff448925738cc26021711be40b9daa8 Mon Sep 17 00:00:00 2001 From: nds Date: Sat, 27 Dec 2014 11:07:50 +0300 Subject: [PATCH] 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. --- src/PartSet/PartSet_SketcherMgr.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) 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 } -- 2.39.2