]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Bug PAL12904 (slow display with geompy). UpdateViewer() method implementation.
authormzn <mzn@opencascade.com>
Tue, 5 Sep 2006 13:06:16 +0000 (13:06 +0000)
committermzn <mzn@opencascade.com>
Tue, 5 Sep 2006 13:06:16 +0000 (13:06 +0000)
src/GEOMGUI/GeometryGUI_Swig.cxx
src/GEOMGUI/GeometryGUI_Swig.hxx
src/GEOMGUI/GeometryGUI_Swig.i

index 4f563eb131f178fdddefd48b55304b0b339b4205..bd43124355f59061b76c9b496a501b4403b030cd 100644 (file)
@@ -269,6 +269,25 @@ void GEOM_Swig::createAndDisplayFitAllGO (const char* Entry)
   ProcessVoidEvent(new TEventFitAll());
 }
 
+void GEOM_Swig::UpdateViewer()
+{
+  class TEventUpdateViewer: public SALOME_Event
+  {
+    public:
+      TEventUpdateViewer() {}
+      virtual void Execute() {
+       SUIT_Application* app = SUIT_Session::session()->activeApplication();
+       if (!app) return;
+       SalomeApp_Study* ActiveStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
+       if (!ActiveStudy) return;
+       
+       GEOM_Displayer(ActiveStudy).UpdateViewer();
+      }
+  };
+  
+  ProcessVoidEvent(new TEventUpdateViewer());
+}
+
 int GEOM_Swig::getIndexTopology(const char* SubIOR, const char* IOR)
 {
   GEOM::GEOM_Gen_var aGeomGen = GeometryGUI::GetGeomGen();
index ceff728c7b46a52d0cef4a03866cd09afb6177be..45762a73f99c9c4af13fb109aad227154f420df5 100644 (file)
@@ -52,6 +52,7 @@ public:
   void createAndDisplayGO(const char* Entry, bool isUpdated = true);
   void eraseGO(const char* Entry, bool allWindows);
   void createAndDisplayFitAllGO(const char* Entry);
+  void UpdateViewer();
   void setDisplayMode(const char* Entry, int mode, bool isUpdated = true);
   void setColor(const char* Entry, int red, int green, int blue, bool isUpdated = true);
   void setTransparency(const char* Entry, float transp, bool isUpdated = true);
index 35c450ff79d0ee252f377f38857ab85642d77f90..d562c0ffc99994f1a72cbfa6789ef871e4bfe732 100644 (file)
@@ -59,6 +59,7 @@ class GEOM_Swig
   void createAndDisplayGO(const char* Entry, bool isUpdated =true);
   void eraseGO(const char* Entry, bool allWindows);
   void createAndDisplayFitAllGO(const char* Entry);
+  void UpdateViewer();
   int  getIndexTopology(const char *SubEntry, const char *Entry);
   const char* getShapeTypeString(const char *Entry);