From d8d068937cf2ab18fba9f7175cc88b819380995d Mon Sep 17 00:00:00 2001 From: nds Date: Sat, 27 Dec 2014 13:44:05 +0300 Subject: [PATCH] The local selection restore for a feature vertex (it is checked on the line feature) Restore the selection for the results also. --- src/PartSet/PartSet_SketcherMgr.h | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/PartSet/PartSet_SketcherMgr.h b/src/PartSet/PartSet_SketcherMgr.h index 183167bba..083e918b5 100644 --- a/src/PartSet/PartSet_SketcherMgr.h +++ b/src/PartSet/PartSet_SketcherMgr.h @@ -71,33 +71,39 @@ private: double& theX, double& theY); /// Obtains the current selection of the object in the workshop viewer - /// It includes the selection in all modes of activation, even local context - vertexes, edges - /// The result is a list of attributes of the feature of the object - /// In addition, it retuns a list of selection modes, where the object is activated + /// It includes the selection in all modes of activation, even local context - vertices, edges + /// It gets all results of the feature, find an AIS object in the viewer and takes all BRep + /// selection owners. If the owner is vertex, the corresponded attribute is seached in + /// the feature, if the owner is edge, the current result is added to the container of results. /// \param theObject a feature or result object /// \param theSketch a current sketch feature /// \param theWorkshop a workshop to have an access to AIS context and displayer /// \param theSelectedAttributes an out list of selected attributes - /// \param theSelectedAttributes an out list of selected results + /// \param theSelectedResults an out list of selected results static void getCurrentSelection(const ObjectPtr& theObject, const FeaturePtr& theSketch, ModuleBase_IWorkshop* theWorkshop, - std::list& theSelectedAttributes, - std::list& theSelectedResults); + std::set& theSelectedAttributes, + std::set& theSelectedResults); /// Applyes the current selection to the object in the workshop viewer /// It includes the selection in all modes of activation, even local context - vertexes, edges - /// The result is a list of attributes of the feature of the object - /// In addition, it retuns a list of selection modes, where the object is activated + /// It gets all results of the feature, find an AIS object in the viewer and takes all BRep + /// selection owners. If the owner is vertex, the corresponded attribute is seached in + /// the feature and if it is in the container of selected attributes, the owner is put in the + /// out container. If the owner is edge and the current result is in the container of selected + /// results, the owner is put in the out container. /// \param theObject a feature or result object /// \param theSketch a current sketch feature /// \param theWorkshop a workshop to have an access to AIS context and displayer - /// \param theSelectedAttributes an out list of selected attributes + /// \param theSelectedAttributes an list of selected attributes + /// \param theSelectedResults an list of selected results + /// \param theOwnersToSelect an out container of found owners static void getSelectionOwners(const ObjectPtr& theObject, const FeaturePtr& theSketch, ModuleBase_IWorkshop* theWorkshop, - const std::list& theSelectedAttributes, - const std::list& theSelectedResults, + const std::set& theSelectedAttributes, + const std::set& theSelectedResults, SelectMgr_IndexedMapOfOwner& anOwnersToSelect); private: -- 2.39.2