}
}
+// mkr : IPAL11549 : before remove Macro Node we have to destroy
+// all its opened sub-graphs
+void SUPERVGUI_CanvasMacroNode::remove()
+{
+ SUPERV_Graph aGraph;
+ if (getEngine()->IsMacro()) {
+ SUPERV_Graph aMacro = getMacroNode();
+ if (aMacro->IsStreamMacro())
+ aGraph = aMacro->StreamObjRef();
+ else
+ aGraph = aMacro->FlowObjRef();
+ }
+ if (SUPERV_isNull(aGraph)) {
+ QMessageBox::warning(SUIT_Session::session()->activeApplication()->desktop(), tr("WARNING"), tr("MSG_NOSUBGRAPH_TO_REMOVE"));
+ return;
+ }
+ else {
+ getMain()->destroySubGraph(aGraph->Name());
+ }
+
+ SUPERVGUI_CanvasNode::remove();
+}
+
//=====================================================================
// Cell node: node for table view
//=====================================================================
sync();
show();
- if ( myLogged && !myLogFileName.isEmpty() && QFile::exists( myLogFileName ) ) {
+ if ( myLogged && !myLogFileName.isEmpty() /*&& QFile::exists( myLogFileName )*/ ) { // mkr : PAL7037
myLogFile = fopen( myLogFileName.latin1(), "a" );
if ( myLogFile == NULL )
myLogged = false;
SUIT_ViewManager* aVM = it.data()->getViewManager();
STD_Application* anApp = dynamic_cast<STD_Application*>( SUIT_Session::session()->activeApplication() );
if ( anApp ) anApp->removeViewManager(aVM);
- if ( aVM ) delete aVM;
+ //if ( aVM ) delete aVM; // mkr : IPAL11547
}
mySubGraphs.clear();
fclose( myLogFile );
}
myLogFile = NULL;
- if ( myLogged && !myLogFileName.isEmpty() && QFile::exists( myLogFileName ) ) {
+ if ( myLogged && !myLogFileName.isEmpty() /*&& QFile::exists( myLogFileName )*/ ) { // mkr : PAL7037
myLogFile = fopen( myLogFileName.latin1(), "a" );
if ( myLogFile == NULL ) {
myLogged = false;
if ( aStudyFrame ) {
SUPERVGraph_ViewFrame* aViewFrame = dynamic_cast<SUPERVGraph_ViewFrame*>( aStudyFrame );
if( aViewFrame ) {
- /*SUPERVGUI_Main* m = */new SUPERVGUI_Main(aViewFrame,
- aSupMod->application()->desktop(),//getDesktop(),
- aGraph);
+ new SUPERVGUI_Main(aViewFrame,
+ aSupMod->application()->desktop(),//getDesktop(),
+ aGraph);
// connect(aStudyFrame, SIGNAL(sfStudyFrameClosing(QAD_StudyFrame*)),
// this, SLOT(onSubGraphClosed(QAD_StudyFrame*)));
connect(aSupMod->application()->desktop(), SIGNAL(windowActivated( SUIT_ViewWindow* )),
}
}
+// mkr : IPAL11549
+void SUPERVGUI_Main::destroySubGraph(QString theSubGraphName)
+{
+ if ( mySubGraphs.contains(theSubGraphName) ) {
+ SUIT_ViewWindow* aStudyFrame = mySubGraphs[theSubGraphName];
+ onSubGraphClosed(aStudyFrame);
+ SUIT_ViewManager* aVM = aStudyFrame->getViewManager();
+ STD_Application* anApp = dynamic_cast<STD_Application*>( SUIT_Session::session()->activeApplication() );
+ if ( anApp ) anApp->removeViewManager(aVM);
+ }
+}
+
bool SUPERVGUI_Main::eventFilter( QObject* o, QEvent* e)
{
// workaround to get close event
if ( aMainList->count() == 1 ) {
SUPERVGUI_Main* aMain = dynamic_cast<SUPERVGUI_Main*>( aMainList->first() );
if ( aMain )
- if ( !QString(aMain->getDataflow()->getIOR()).compare(getDataflow()->getIOR()) // equal dataflows
+ if ( !CORBA::is_nil( aMain->getDataflow() )
+ &&
+ !QString(aMain->getDataflow()->getIOR()).compare(getDataflow()->getIOR()) // equal dataflows
&&
aMain != this ) // not equal mains
aMain->getCanvas()->merge();
long counter;
char* date;
long stamp;
-
+
while (notification->Receive(&graph, &node, &type, &message, &sender, &counter, &date, &stamp)) {
-// if (isFiltered(graph, node, type, message, sender, counter, date, stamp)) {
+ if (isFiltered(graph, node, type, message, sender, counter, date, stamp)) { // mkr : PAL7037
QString mess("");
mess += "NOTIF: "; mess += graph;
mess += " / " ; mess += node;
mess += " / " ; mess += type;
mess += " / " ; mess += message;
getMessage()->putMessage(mess.latin1());
-// };
+ };
};
}
bool b = false;
if (strcmp(getDataflow()->Name(), graph) == 0) {
SUPERVGUI_CanvasNode* n;
- QObjectList* nodes = queryList("SUPERVGUI_CanvasNode");
+ QObjectList* nodes;
+ // mkr : PAL7037 -->
+ if (myCurrentView == CANVASTABLE)
+ nodes = myArray->queryList("SUPERVGUI_CanvasNode");
+ else
+ nodes = myCanvas->queryList("SUPERVGUI_CanvasNode");
+ // mkr : PAL7037 <--
QObjectListIt i(*nodes);
while ((n=(SUPERVGUI_CanvasNode*)i.current()) != 0) {
++i;