void PartSet_OperationFeatureCreate::initFeature(FeaturePtr theFeature)
{
-// if (!theFeature || theFeature->getKind() != SKETCH_LINE_KIND)
-// return;
+ //if (!theFeature || theFeature->getKind() != SKETCH_LINE_KIND)
+ // return;
myInitFeature = theFeature;
}
return PartSet_OperationSketchBase::getSelectionModes(theFeature);
}
-void PartSet_OperationFeatureEdit::init(FeaturePtr theFeature,
- const std::list<XGUI_ViewerPrs>& theSelected,
- const std::list<XGUI_ViewerPrs>& theHighlighted)
+void PartSet_OperationFeatureEdit::initFeature(FeaturePtr theFeature)
{
setEditingFeature(theFeature);
}
+
FeaturePtr PartSet_OperationFeatureEdit::sketch() const
{
return mySketch;
/// \return the selection mode
virtual std::list<int> getSelectionModes(FeaturePtr theFeature) const;
- /// Initializes some fields accorging to the feature
- /// \param theFeature the feature
- /// \param theSelected the list of selected presentations
- /// \param theHighlighted the list of highlighted presentations
- virtual void init(FeaturePtr theFeature,
- const std::list<XGUI_ViewerPrs>& theSelected,
- const std::list<XGUI_ViewerPrs>& theHighlighted);
+ /// Initializes the operation with previously created feature. It is used in sequental operations
+ virtual void initFeature(FeaturePtr theFeature);
/// Returns the operation sketch feature
/// \returns the sketch instance
return theOperation->getDescription()->operationId().toStdString() == PartSet_OperationSketch::Type();
}
-void PartSet_OperationFeatureEditMulti::init(FeaturePtr theFeature,
- const std::list<XGUI_ViewerPrs>& theSelected,
- const std::list<XGUI_ViewerPrs>& theHighlighted)
+void PartSet_OperationFeatureEditMulti::initSelection(const std::list<XGUI_ViewerPrs>& theSelected,
+ const std::list<XGUI_ViewerPrs>& theHighlighted)
{
- setEditingFeature(theFeature);
-
if (!theHighlighted.empty()) {
// if there is highlighted object, we check whether it is in the list of selected objects
// in that case this object is a handle of the moved lines. If there no such object in the selection,
myFeatures = theSelected;
}
+void PartSet_OperationFeatureEditMulti::initFeature(FeaturePtr theFeature)
+{
+ setEditingFeature(theFeature);
+}
+
FeaturePtr PartSet_OperationFeatureEditMulti::sketch() const
{
return mySketch;
/// \param theOperation the previous running operation
virtual bool isGranted(ModuleBase_IOperation* theOperation) const;
- /// Initializes some fields accorging to the feature
- /// \param theFeature the feature
+ /// Initializes the operation with previously created feature. It is used in sequental operations
+ virtual void initFeature(FeaturePtr theFeature);
+
+ /// Initialisation of operation with preliminary selection
/// \param theSelected the list of selected presentations
/// \param theHighlighted the list of highlighted presentations
- virtual void init(FeaturePtr theFeature,
- const std::list<XGUI_ViewerPrs>& theSelected,
- const std::list<XGUI_ViewerPrs>& theHighlighted);
+ virtual void initSelection(const std::list<XGUI_ViewerPrs>& theSelected,
+ const std::list<XGUI_ViewerPrs>& theHighlighted);
/// Returns the operation sketch feature
/// \returns the sketch instance
return aModes;
}
-void PartSet_OperationSketch::init(FeaturePtr theFeature,
- const std::list<XGUI_ViewerPrs>& /*theSelected*/,
- const std::list<XGUI_ViewerPrs>& /*theHighlighted*/)
+
+/// Initializes the operation with previously created feature. It is used in sequental operations
+void PartSet_OperationSketch::initFeature(FeaturePtr theFeature)
{
if (theFeature)
setEditingFeature(theFeature);
/// \return the selection mode
virtual std::list<int> getSelectionModes(FeaturePtr theFeature) const;
- /// Initializes some fields accorging to the feature
- /// \param theSelected the list of selected presentations
- /// \param theHighlighted the list of highlighted presentations
- virtual void init(FeaturePtr theFeature,
- const std::list<XGUI_ViewerPrs>& theSelected,
- const std::list<XGUI_ViewerPrs>& theHighlighted);
+ /// Initializes the operation with previously created feature. It is used in sequental operations
+ virtual void initFeature(FeaturePtr theFeature);
/// Returns the operation sketch feature
/// \returns the sketch instance