#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"
#include <qtooltip.h>
*/
-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),
}
isIgnore = false;
+
+ QCanvasItemList anIL2 = ((QCanvas*)parent())->allItems();
+ cout<<" ===> 1 conatructor CanvasNode : CanvasArray has "<<anIL2.count()<<" children!"<<endl;
}
SUPERVGUI_CanvasNode::~SUPERVGUI_CanvasNode()
if (myMain->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()));
{
//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)) {
}
}
}
- 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();
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");
SUPERVGUI_Python cp(myMain->getStudy()->get_PyInterp(), !myMain->isEditable());
cp.exec();
}
+*/
bool SUPERVGUI_CanvasNode::isWarning()
{