Salome HOME
NRI : Merge from V1_2.
[modules/superv.git] / src / SUPERVGUI / SUPERVGUI_Main.cxx
index 31b3801c3ccd97d78b0b701c2cb4030910e656ba..f5b65bb3a14673717536b8dff31cda43df9550e2 100644 (file)
@@ -651,7 +651,7 @@ void SUPERVGUI_Main::addGOTONode(SUPERV_CNode theNode) {
 /**
  * Add Control node
  */
-void SUPERVGUI_Main::addControlNode(SUPERV_CNode theStartNode, SUPERV_CNode theEndNode) {
+void SUPERVGUI_Main::addControlNode(SUPERV_CNode theStartNode, SUPERV_CNode theEndNode, bool Update) {
   switch (myCurrentView) {
   case GRAPH:
     {
@@ -664,8 +664,10 @@ void SUPERVGUI_Main::addControlNode(SUPERV_CNode theStartNode, SUPERV_CNode theE
       graph->addChild(aStartPrs, theStartNode->X(), theStartNode->Y());
       graph->ResizeGraph(aEndPrs, theEndNode->X(), theEndNode->Y());
       graph->addChild(aEndPrs, theEndNode->X(), theEndNode->Y());
-      aStartPrs->updateLinksPrs();
-      aEndPrs->updateLinksPrs();
+      if (Update) {
+       aStartPrs->updateLinksPrs();
+       aEndPrs->updateLinksPrs();
+      }
       aStartPrs->sync();
       aEndPrs->sync();
       graph->repaintContents();
@@ -685,8 +687,10 @@ void SUPERVGUI_Main::addControlNode(SUPERV_CNode theStartNode, SUPERV_CNode theE
       graph->addChild(aStartPrs, theStartNode->X(), theStartNode->Y());
       graph->ResizeGraph(aEndPrs, theEndNode->X(), theEndNode->Y());
       graph->addChild(aEndPrs, theEndNode->X(), theEndNode->Y());
-      aStartPrs->updateLinksPrs();
-      aEndPrs->updateLinksPrs();
+      if (Update) {
+       aStartPrs->updateLinksPrs();
+       aEndPrs->updateLinksPrs();
+      }
       aStartPrs->sync();
       aEndPrs->sync();
       graph->repaintContents();