Salome HOME
Merge remote branch 'origin/abn/guifix' into V7_5_BR
[modules/paravis.git] / src / PVGUI / PVGUI_Module_widgets.cxx
index cead1a0bcec6c50aba0432926e99a6a925da3161..7ddee81bfcf2221be03b8e2d633d47c44ab9734d 100644 (file)
 
 #include <vtkPVGeneralSettings.h>
 
+class ResizeHelper : public pqPVAnimationWidget
+{
+  // TEMPORARILY WORKAROUND AROUND PARAVIEW 3.14 BUG:
+  // WHEN ANIMATION VIEW IS RESIZED, ITS CONTENTS IS NOT PREPERLY RE-ARRANGED
+  // CAUSING SOME CONTROLS TO STAY NON-VISIBLE
+  // THIS BUG IS NATURALLY FIXED BY ADDING
+  //      this->updateGeometries();
+  // TO THE
+  //     void pqAnimationWidget::resizeEvent(QResizeEvent* e);
+  // BUT THIS CANNOT BE DONE DIRECTLY, SINCE CORRESPONDING API IS NOT PUBLIC
+  // THE ONLY WAY TO DO THIS BY SENDING SHOW EVENT TO THE WIDGET
+
+public:
+  ResizeHelper( QWidget* parent ) : pqPVAnimationWidget( parent ) {}
+protected:
+  void resizeEvent(QResizeEvent* e)
+  {
+    pqAnimationWidget* w = findChild<pqAnimationWidget*>( "pqAnimationWidget" );
+    if ( w ) {
+      QShowEvent e;
+      QApplication::sendEvent( w, &e );
+    }
+    pqPVAnimationWidget::resizeEvent( e );
+  }
+};
+
+
+
 /*!
   \brief Create dock widgets for ParaView widgets such as object inspector, pipeline browser, etc.
   ParaView pqMainWindowCore class is fully responsible for these dock widgets' contents.
@@ -213,7 +241,7 @@ void PVGUI_Module::setupDockWidgets()
   QDockWidget* animationViewDock     = new QDockWidget( tr( "TTL_ANIMATION_VIEW" ), desk );
   animationViewDock->setObjectName("animationViewDock");
   desk->addDockWidget( Qt::BottomDockWidgetArea, animationViewDock );
-  pqPVAnimationWidget* animation_panel = new pqPVAnimationWidget(animationViewDock); // [ABN] was resizeHelper
+  pqPVAnimationWidget* animation_panel = new ResizeHelper(animationViewDock); // [ABN] was resizeHelper
   animationViewDock->setWidget(animation_panel);
   myDockWidgets[animationViewDock] = false; // hidden by default