}
}
+void SUPERVGUI_Main::changeDSGraphParameters() {
+ SUPERVGUI_DSGraphParameters* aDlg = new SUPERVGUI_DSGraphParameters(dataflow, dataflow->IsReadOnly());
+ if (aDlg->exec() )
+ sync();
+ delete aDlg;
+}
+
void SUPERVGUI_Main::syncAsync() {
Trace("SUPERVGUI_Main::syncAsync");
QTimer::singleShot(1, this, SLOT(sync()));
bool SUPERVGUI_Main::putDataStudy( SUPERV_Port p, const char* inout ) {
Trace("SUPERVGUI_Main::putDataStudy");
+ bool PublishOtherComponent = false;
+
// static variable to ensure that only one instance (thread) is executing this function
static bool isIn = false;
if (isIn) return true;
if ( !aSStudy ) return false;
aTmpSO = aDriver->PublishInStudy( aSStudy->GetStudy(), aTmpSO, anObject, "" );
aBuilder->Addreference(aSO, _PTR(SObject)(new SALOMEDS_SObject( aTmpSO )) );
+ PublishOtherComponent = true;
}
else { // can't publish object: abort transaction
MESSAGE( "CanPublishInStudy() returned FALSE. ok, AbortCommand.." );
}
else { // component has no driver, but could store IORs (like Calculator)
_PTR(SObject) anIORSO ( aStudy->FindObjectIOR( p->ToString() ) );
- if ( anIORSO )
+ if ( anIORSO ) {
aBuilder->Addreference(aSO, anIORSO);
+ // mkr : IPAL9672
+ PublishOtherComponent = true;
+ }
else { // Hm... the object (==port value) was not found, so we don't publish it.
MESSAGE( "The object (==port value) was not found, so we don't publish it" );
aBuilder->AbortCommand();
}
}
else { // FNode is NULL -> bad
- MESSAGE( "FNode is NULL. Not good at all. Aborting command." );
- aBuilder->AbortCommand();
- isIn = false;
- return false;
+ MESSAGE( "FNode is NULL." );
+ if ( SUPERV::INode::_narrow( p->Node() ) ) { // mkr : IPAL10175
+ _PTR(SObject) anIORSO ( aStudy->FindObjectIOR( p->ToString() ) );
+ if ( anIORSO )
+ aBuilder->Addreference(aSO, anIORSO);
+ }
+ else {
+ MESSAGE( "FNode and INode are NULL. Not good at all. Aborting command." );
+ aBuilder->AbortCommand();
+ isIn = false;
+ return false;
+ }
}
}
else {
aBuilder->CommitCommand();
else
aBuilder->AbortCommand();
-
- if ( !myThread->running() ) {
- SUPERVGUI* aSupMod = SUPERVGUI::Supervision();
- if ( aSupMod )
+
+ SUPERVGUI* aSupMod = SUPERVGUI::Supervision();
+ if ( aSupMod ) {
+ if ( PublishOtherComponent )
+ dynamic_cast<SalomeApp_Application*>( study->application() )->updateObjectBrowser(true);
+ else
aSupMod->updateObjBrowser();
- else MESSAGE("NULL Supervision module!");
}
-
+ else MESSAGE("NULL Supervision module!");
+
isIn = false;
return true;
}
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)) {
QString mess("");
mess += "NOTIF: "; mess += graph;
mess += " / " ; mess += node;
mess += " / " ; mess += type;
mess += " / " ; mess += message;
getMessage()->putMessage(mess.latin1());
- };
+// };
};
}
return true;
}
+void SUPERVGUI_Main::resizeView( QResizeEvent* theEvent )
+{
+ if ( (myCurrentView == CANVAS || myCurrentView == CONTROLFLOW) && getCanvas() )
+ if ( getCanvas()->width() < theEvent->size().width()
+ ||
+ getCanvas()->height() < theEvent->size().height() )
+ getCanvas()->resize( theEvent->size().width(), theEvent->size().height() );
+ if ( myCurrentView == CANVASTABLE && getCanvasArray() )
+ if ( getCanvasArray()->width() < theEvent->size().width()
+ ||
+ getCanvasArray()->height() < theEvent->size().height() )
+ getCanvasArray()->resize( theEvent->size().width(), theEvent->size().height() );
+}
+
/******************************* SUPERVGUI_Thread class ****************************************/
SUPERVGUI_Thread::SUPERVGUI_Thread()
:QThread()
// blocking function of Engine. Return from there only after anEvent happens on node aNode
myMain->getDataflow()->Event(aNode, aEvent, aState);
+ // in case node "said" something during changing state through notification mechanism - output it
+ myMain->syncNotification();
+
// "kill" or undefined event came
if (( aEvent == SUPERV::UndefinedEvent && aState == SUPERV::UndefinedState ) ||
( aEvent == SUPERV::NoEvent && aState == SUPERV::NoState ) ||