- typedef QMap<FeaturePtr, std::pair<std::set<AttributePtr>, std::set<ResultPtr> > >
- FeatureToSelectionMap;
-
- /// 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
- /// 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 theFeature 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 theSelection a container for the selection, to save results and attributres for a feature
- static void getCurrentSelection(const FeaturePtr& theFeature,
- const FeaturePtr& theSketch,
- ModuleBase_IWorkshop* theWorkshop,
- FeatureToSelectionMap& theSelection);
+ /// Show distance value editor if it is a distance operation and all attribute references
+ /// are filled by preseletion
+ /// \return true if the value is accepted
+ static bool setDistanceValueByPreselection(ModuleBase_Operation* theOperation,
+ ModuleBase_IWorkshop* theWorkshop,
+ bool& theCanCommitOperation);