Salome HOME
Minor bug fix for ALAMOS
[modules/gui.git] / src / SALOME_PYQT / SalomePyQt / SalomePyQt.cxx
index 75642bf48cc6c3bfe231bdb2af8d4748e37954e6..e6edb9d988be2be0a08b015e062438d59d73dac0 100644 (file)
@@ -41,6 +41,8 @@
 #include "OCCViewer_ViewWindow.h"
 #include "Plot2d_ViewManager.h"
 #include "Plot2d_ViewWindow.h"
+#include "PVViewer_ViewManager.h"
+#include "PVViewer_ViewModel.h"
 #include "QtxActionMenuMgr.h"
 #include "QtxWorkstack.h"
 #include "QtxTreeView.h"
@@ -55,6 +57,7 @@
 #include <QAction>
 #include <QApplication>
 #include <QPaintEvent>
+#include <QCoreApplication>
 
 /*!
   \brief Get the currently active application.
@@ -2654,7 +2657,9 @@ public:
 };
 int SalomePyQt::createView( const QString& type, bool visible, const int width, const int height )
 {
-  return ProcessEvent( new TCreateView( type, visible, width, height ) );
+  int ret = ProcessEvent( new TCreateView( type, visible, width, height ) );
+  QCoreApplication::processEvents();
+  return ret;
 }
 
 /*!
@@ -3826,6 +3831,26 @@ void SalomePyQt::setPlot2dFitRange(const int id, const double XMin, const double
        ProcessVoidEvent( new TPlot2dFitRange(id, XMin, XMax, YMin, YMax) ); 
 }
 
+//class TInitParaview: public SALOME_Event
+//{
+//public:
+//  TInitParaview() {}
+//  virtual void Execute() {
+//    LightApp_Application* anApp = getApplication();
+//    // Create PVViewer_ViewManager, which will initialize ParaView stuff
+//    PVViewer_ViewManager* viewMgr =
+//          dynamic_cast<PVViewer_ViewManager*>( anApp->getViewManager( PVViewer_Viewer::Type(), true ) );
+//  }
+//};
+//void SalomePyQt::initializeParaViewGUI()
+//{
+//  ProcessVoidEvent( new TInitParaview() );
+//}
+
+void SalomePyQt::processEvents()
+{
+  QCoreApplication::processEvents();
+}
 
 void SalomePyQt::setVisibilityState( const QString& theEntry, VisibilityState theState)
 {