Salome HOME
Fix for bug IPAL10143 : Black rectangle in SUPERVISIUON viewer.
authormkr <mkr@opencascade.com>
Wed, 5 Oct 2005 14:44:22 +0000 (14:44 +0000)
committermkr <mkr@opencascade.com>
Wed, 5 Oct 2005 14:44:22 +0000 (14:44 +0000)
src/SUPERVGUI/SUPERVGUI.cxx
src/SUPERVGUI/SUPERVGUI_Main.cxx
src/SUPERVGUI/SUPERVGUI_Main.h

index 8c8886df04e84a00865fd49901022279ca662ab2..3a7d810cb1f4a58fef5e6e2ca17ce1a000901fb4 100644 (file)
@@ -680,6 +680,7 @@ bool SUPERVGUI::createDataflow( const NEW_DF_MODE mode, bool theInitialDF ) {
     }
     else
       registerGraph( f, main );
+    main->resizeView( new QResizeEvent( aViewFrame->size(), aViewFrame->size() ) );
     aViewFrame->show();
   }
 
index 494dd7e5cf2e080693f1a7078f659e7cefec166f..c404cebc7ed4c01c4ed710f8f6611eead0d6d379 100644 (file)
@@ -1293,6 +1293,20 @@ bool SUPERVGUI_Main::ReadyToModify() {
   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()
index de7bc80862ca2e128c5ec32f9f2f60be2c182bea..e0f834e0993d9986548e61a4c459bd9774d68f27 100644 (file)
@@ -131,6 +131,8 @@ class SUPERVGUI_Main: public SUPERVGraph_View {
 
     GraphViewType getViewType() { return myCurrentView; }
 
+    virtual void resizeView( QResizeEvent* theEvent );
+
   signals:
     void KillMyThread(bool theValue);