Salome HOME
Create custom action for sketch plane update.
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Sketch.cpp
index 852213ba7621f3e2a2554b05b9c990d93277fb48..811ccb0bf602b6c22026c2080d35f89fc481b36b 100644 (file)
@@ -48,6 +48,7 @@
 #include <SketchPlugin_SketchEntity.h>
 #include <SketchPlugin_Tools.h>
 
+#include <Events_InfoMessage.h>
 #include <Events_Loop.h>
 
 #include <memory>
@@ -369,3 +370,21 @@ std::shared_ptr<GeomAPI_Ax3> SketchPlugin_Sketch::plane(SketchPlugin_Sketch* the
 
   return std::shared_ptr<GeomAPI_Ax3>(new GeomAPI_Ax3(anOrigin->pnt(), aDirX->dir(), aNorm->dir()));
 }
+
+bool SketchPlugin_Sketch::customAction(const std::string& theActionId)
+{
+  bool isOk = false;
+  if (theActionId == ACTION_REMOVE_EXTERNAL())
+    isOk = removeLinksToExternal();
+  else {
+    std::string aMsg = "Error: Feature \"%1\" does not support action \"%2\".";
+    Events_InfoMessage("SketchPlugin_Sketch", aMsg).arg(getKind()).arg(theActionId).send();
+  }
+  return isOk;
+}
+
+bool SketchPlugin_Sketch::removeLinksToExternal()
+{
+  // TODO
+  return true;
+}