From fa8745c35a1b172475d3db94ca2f228a1d518787 Mon Sep 17 00:00:00 2001 From: rnv Date: Wed, 19 Aug 2020 22:38:11 +0300 Subject: [PATCH] '[CEA 19033] With VirtualGL, VTK viewer is void' : repaint viewer on resize window --- src/SVTK/SVTK_ViewWindow.cxx | 8 ++++++++ src/SVTK/SVTK_ViewWindow.h | 3 +++ 2 files changed, 11 insertions(+) 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); -- 2.39.2