]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
'[CEA 19033] With VirtualGL, VTK viewer is void' : repaint viewer on resize window
authorrnv <rnv@opencascade.com>
Wed, 19 Aug 2020 19:38:11 +0000 (22:38 +0300)
committerrnv <rnv@opencascade.com>
Wed, 19 Aug 2020 19:38:11 +0000 (22:38 +0300)
src/SVTK/SVTK_ViewWindow.cxx
src/SVTK/SVTK_ViewWindow.h

index 59e07e88e0ed043888ba19b8170aa4a26ee4cacf..14b9587f98271ecfd8ff143068be4cce2f5e6a85 100644 (file)
@@ -34,6 +34,7 @@
 
 #include <QMenu>
 #include <QToolBar>
+#include <QTimer>
 #include <QEvent>
 #include <QFileInfo>
 #include <QSignalMapper>
@@ -2836,3 +2837,10 @@ void SVTK_ViewWindow::synchronize( SUIT_ViewWindow* theView )
 
   blockSignals( blocked );
 }
+
+void SVTK_ViewWindow::resizeEvent( QResizeEvent* theEvent )
+{
+#ifdef VGL_WORKAROUND
+  QTimer::singleShot(0, [this] () { this->Repaint(); } );
+#endif
+}
index 5e8980bb76902cc766bd5596ff58ae678271d092..0ab5d79204351fd0661ddeb782b8d2dd13f2a2ac 100644 (file)
@@ -416,6 +416,9 @@ public:
   enum AnaglyphFilter { RedCyan, YellowBlue, GreenMagenta };
 
 protected:
+  
+  virtual void resizeEvent( QResizeEvent* );
+  
   virtual void Initialize(SVTK_View* theView,
                           SVTK_ViewModelBase* theModel);