From: rnv Date: Wed, 19 Aug 2020 19:38:11 +0000 (+0300) Subject: '[CEA 19033] With VirtualGL, VTK viewer is void' : repaint viewer on resize window X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fa8745c35a1b172475d3db94ca2f228a1d518787;p=modules%2Fgui.git '[CEA 19033] With VirtualGL, VTK viewer is void' : repaint viewer on resize window --- diff --git a/src/SVTK/SVTK_ViewWindow.cxx b/src/SVTK/SVTK_ViewWindow.cxx index 59e07e88e..14b9587f9 100644 --- a/src/SVTK/SVTK_ViewWindow.cxx +++ b/src/SVTK/SVTK_ViewWindow.cxx @@ -34,6 +34,7 @@ #include #include +#include #include #include #include @@ -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 +} diff --git a/src/SVTK/SVTK_ViewWindow.h b/src/SVTK/SVTK_ViewWindow.h index 5e8980bb7..0ab5d7920 100644 --- a/src/SVTK/SVTK_ViewWindow.h +++ b/src/SVTK/SVTK_ViewWindow.h @@ -416,6 +416,9 @@ public: enum AnaglyphFilter { RedCyan, YellowBlue, GreenMagenta }; protected: + + virtual void resizeEvent( QResizeEvent* ); + virtual void Initialize(SVTK_View* theView, SVTK_ViewModelBase* theModel);