Salome HOME
#1330 Multiply selection when Create fillet using Shift button
[modules/shaper.git] / src / ModelAPI / ModelAPI_CompositeFeature.h
index 0814141b71830ecc0b49527a1ab9b2c45cfefda0..bc31a21eb80cc57f014b44c3e9478cf2843aaf4d 100644 (file)
@@ -28,7 +28,7 @@ public:
   virtual int numberOfSubs(bool forTree = false) const = 0;
 
   /// Returns the sub-feature by zero-base index
-  virtual std::shared_ptr<ModelAPI_Feature> subFeature(const int theIndex, bool forTree = false) const = 0;
+  virtual std::shared_ptr<ModelAPI_Feature> subFeature(const int theIndex, bool forTree = false) = 0;
 
   /// Returns the sub-feature unique identifier in this composite feature by zero-base index
   virtual int subFeatureId(const int theIndex) const = 0;
@@ -39,6 +39,10 @@ public:
   /// This method to inform that sub-feature is removed and must be removed from the internal data
   /// structures of the owner (the remove from the document will be done outside just after)
   virtual void removeFeature(std::shared_ptr<ModelAPI_Feature> theFeature) = 0;
+
+  /// Exchanges IDs of two given features: needed for more correct naming in some cases (issue 769)
+  MODELAPI_EXPORT virtual void exchangeIDs(std::shared_ptr<ModelAPI_Feature> theFeature1,
+    std::shared_ptr<ModelAPI_Feature> theFeature2);
 };
 
 //! Pointer on the composite feature object