]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
The local selection restore for a feature vertex (it is checked on the line feature)
authornds <natalia.donis@opencascade.com>
Sat, 27 Dec 2014 08:07:50 +0000 (11:07 +0300)
committernds <natalia.donis@opencascade.com>
Sat, 27 Dec 2014 08:07:50 +0000 (11:07 +0300)
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

index b4a44f8b3d7e7685e8c316fe925f647d0cf24417..52b1581a8297f8797456d6b572dfb774b083b165 100644 (file)
@@ -275,30 +275,22 @@ void PartSet_SketcherMgr::onMouseMoved(ModuleBase_IViewWindow* theWnd, QMouseEve
       foreach(FeaturePtr aFeature, myEditingFeatures) {
         std::shared_ptr<SketchPlugin_Feature> aSketchFeature =
           std::dynamic_pointer_cast<SketchPlugin_Feature>(aFeature);
-        if (aSketchFeature) { 
+        if (aSketchFeature) {
           // save the previous selection
-          QIntList anActivatedModes;
-          ResultPtr aResult = aSketchFeature->firstResult();
 
-          aDisplayer->getModesOfActivation(aResult, anActivatedModes);
-          
           std::list<AttributePtr> 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
         }