From: nds Date: Wed, 25 Feb 2015 17:25:06 +0000 (+0300) Subject: Issue #390 Selection restore problems during edit operation X-Git-Tag: V_1.1.0~171 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=23179449484b06313cf04536df90411f2477a75a;p=modules%2Fshaper.git Issue #390 Selection restore problems during edit operation --- diff --git a/src/PartSet/PartSet_SketcherMgr.h b/src/PartSet/PartSet_SketcherMgr.h index 69e3dcd70..9f2f81051 100644 --- a/src/PartSet/PartSet_SketcherMgr.h +++ b/src/PartSet/PartSet_SketcherMgr.h @@ -92,9 +92,6 @@ public: /// \return a boolean value static bool isDistanceOperation(ModuleBase_Operation* theOperation); - /// Launches the operation from current highlighting - void launchEditing(); - /// Returns current Sketch feature/ Returns NULL if there is no launched sketch operation CompositeFeaturePtr activeSketch() const { return myCurrentSketch; } @@ -156,6 +153,9 @@ private slots: void onBeforeWidgetActivated(ModuleBase_ModelWidget* theWidget); private: + /// Launches the operation from current highlighting + void launchEditing(); + /// Returns list of strings which contains id's of sketch operations static QStringList sketchOperationIdList(); @@ -164,20 +164,8 @@ private: void get2dPoint(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent, Point& thePoint); - typedef QList AttributeList; - typedef QMap FeatureToAttributesMap; - typedef std::map, std::set > > + typedef QMap, std::set > > FeatureToSelectionMap; - /// Obtains the current selection of the object in the workshop viewer by a map of feature to attributes - /// It calls the next method for each feature - /// \param theFeatureToAttributes a map of feature to attributes - /// \param theSketch a current sketch feature - /// \param theWorkshop a workshop to have an access to AIS context and displayer - /// \param theSelection a container for the selection, to save results and attributres for a feature - static void getCurrentSelection(const FeatureToAttributesMap& theFeatureToAttributes, - const FeaturePtr& theSketch, - ModuleBase_IWorkshop* theWorkshop, - FeatureToSelectionMap& theSelection); /// Obtains the current selection of the object in the workshop viewer /// It includes the selection in all modes of activation, even local context - vertices, edges @@ -234,7 +222,10 @@ private: /// \param isToDisplay a flag about the display or erase the feature void visualizeFeature(ModuleBase_Operation* theOperation, const bool isToDisplay); - void storeSelection(); + /// Saves the current selection in the viewer into an internal container + /// It obtains the selected attributes. The highlighted objects can be processes as the selected ones + /// \param theHighlightedUse a boolean flag + void storeSelection(const bool theHighlightedOnly = false); void restoreSelection(); private: @@ -251,8 +242,6 @@ private: CompositeFeaturePtr myCurrentSketch; - FeatureToAttributesMap myFeature2AttributeMap; /// a map of a feature to attributes - Handle(ModuleBase_ShapeInPlaneFilter) myPlaneFilter; FeatureToSelectionMap myCurrentSelection; bool myPreviousUpdateViewerEnabled;