#include <qlineedit.h>
#include <qcombobox.h>
+// PAL8065: san -- Safe access to widgets from secondary thread
+typedef TVoidMemFunEvent<SUPERVGUI_CanvasArray> TCanvasArrayEvent;
+typedef TVoidMemFunEvent<SUPERVGUI_Canvas> TCanvasEvent;
+
+class UpdateEvent : public SALOME_Event
+{
+ public:
+ UpdateEvent( QAD_Study* study, bool updSel = true ) : myStudy( study ), myUpdateSel( updSel ) {}
+ virtual void Execute(){
+ if ( myStudy ) myStudy->updateObjBrowser( myUpdateSel );
+ }
+
+ private:
+ QAD_Study* myStudy;
+ bool myUpdateSel;
+};
+// PAL8065: san
SUPERVGUI_Main::SUPERVGUI_Main(SUPERVGraph_ViewFrame* theParent, QAD_Desktop* theDesktop, SUPERV_Graph theDataFlow )
: SUPERVGraph_View(theParent),
t += dataflow->Name();
setCaption(t);
+
+ // PAL8065: san
+ ProcessVoidEvent( new UpdateEvent( study ) );
- study->updateObjBrowser();
if (myCurrentView == CANVASTABLE) {
- myArray->sync();
- myArray->update();
+ // PAL8065: san
+ ProcessVoidEvent( new TCanvasArrayEvent( myArray, &SUPERVGUI_CanvasArray::sync ) );
+ ProcessVoidEvent( new TCanvasArrayEvent( myArray, &SUPERVGUI_CanvasArray::update ) );
} else {
- myCanvas->sync();
- myCanvas->update();
+ // PAL8065: san
+ ProcessVoidEvent( new TCanvasEvent( myCanvas, &SUPERVGUI_Canvas::sync ) );
+ ProcessVoidEvent( new TCanvasEvent( myCanvas, &SUPERVGUI_Canvas::update ) );
}
}