X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSUPERVGUI%2FSUPERVGUI_CanvasNode.cxx;h=f2118629ad410f8d1813c0309bab76bc3952b033;hb=cbb0219fe6d6bf11f98f2306c2855fef1eaa2d44;hp=d3d85eab11cd1230a41e2685d54da13a51b46f81;hpb=13c91f01383afb2f29f0698b732c1470db8095d3;p=modules%2Fsuperv.git diff --git a/src/SUPERVGUI/SUPERVGUI_CanvasNode.cxx b/src/SUPERVGUI/SUPERVGUI_CanvasNode.cxx index d3d85ea..f211862 100644 --- a/src/SUPERVGUI/SUPERVGUI_CanvasNode.cxx +++ b/src/SUPERVGUI/SUPERVGUI_CanvasNode.cxx @@ -11,7 +11,6 @@ using namespace std; #include "SUPERVGUI_CanvasNodePrs.h" #include "SUPERVGUI_CanvasPort.h" #include "SUPERVGUI_Main.h" -#include "SUPERVGUI_Python.h" #include "SUPERVGUI.h" #include "SUPERVGUI_BrowseNodeDlg.h" #include "SUPERVGUI_ManagePortsDlg.h" @@ -23,7 +22,7 @@ using namespace std; #include */ -SUPERVGUI_CanvasNode::SUPERVGUI_CanvasNode(QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode): +SUPERVGUI_CanvasNode::SUPERVGUI_CanvasNode(QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode, bool theIsCell): QObject(theParent), myMain(theMain), myNode(theNode), @@ -75,6 +74,9 @@ SUPERVGUI_CanvasNode::SUPERVGUI_CanvasNode(QObject* theParent, SUPERVGUI_Main* t } isIgnore = false; + + QCanvasItemList anIL2 = ((QCanvas*)parent())->allItems(); + cout<<" ===> 1 conatructor CanvasNode : CanvasArray has "<isEditable() && getNodeType() != SUPERV::EndLoopNode && getNodeType() != SUPERV::EndSwitchNode) { popup->insertItem(tr("MSG_RENAME"), this, SLOT(rename())); - popup->insertItem(tr("MSG_DELETE"), this, SLOT(remove())); + myDeleteItem = popup->insertItem(tr("MSG_DELETE"), this, SLOT(remove())); popup->insertSeparator(); } popup->insertItem(tr("MSG_BROWSE"), this, SLOT(browse())); @@ -275,8 +277,9 @@ void SUPERVGUI_CanvasNode::sync() { //MESSAGE("===> SUPERVGUI_CanvasNode::sync() " << myNode->Name() << ", state " << myNode->State()); + const bool isExecuting = myMain->getDataflow()->IsExecuting(); //if myNode is a MacroNode then set it state to state of its subgraph - if (myNode->IsMacro() && myMain->getDataflow()->IsExecuting()) { + if ( myNode->IsMacro() && isExecuting ) { // get SubGraph from MacroNode SUPERV_Graph aMacro = SUPERV::Graph::_narrow(myNode); if (!SUPERV_isNull(aMacro)) { @@ -293,8 +296,16 @@ void SUPERVGUI_CanvasNode::sync() } } } - else - getPrs()->setState(myNode->State()); + else { + SUPERV::GraphState aState = myNode->State(); + + // asv : 18.11.04 : fix for 6170 : after execution is finished, nodes' status must be reset. + // asv : 13.12.04 : commented out setting EditingState. See 2.21. + //if ( !isExecuting && myMain->IsGUIEventLoopFinished() && (aState == SUPERV::DoneState || + // aState == SUPERV::KillState || aState == SUPERV::StopState ) ) + // aState = SUPERV::EditingState; + getPrs()->setState(aState); + } // update child ports const QObjectList* list = children(); @@ -402,6 +413,7 @@ void SUPERVGUI_CanvasNode::changeInformation() { delete aDlg; } +/* asv : 13.12.04 : The functions below are not called from anywhere, so commenting them out... void SUPERVGUI_CanvasNode::configure() { Trace("SUPERVGUI_CanvasNode::configure"); @@ -414,6 +426,7 @@ void SUPERVGUI_CanvasNode::showPython() SUPERVGUI_Python cp(myMain->getStudy()->get_PyInterp(), !myMain->isEditable()); cp.exec(); } +*/ bool SUPERVGUI_CanvasNode::isWarning() {