X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPVGUI%2FPVGUI_Module_widgets.cxx;h=7ddee81bfcf2221be03b8e2d633d47c44ab9734d;hb=fe837bd5f2aae9a93c8986af24a84520551b2995;hp=cead1a0bcec6c50aba0432926e99a6a925da3161;hpb=bd6043f4c179be9e2035e47c52a050fc19fe0a2f;p=modules%2Fparavis.git diff --git a/src/PVGUI/PVGUI_Module_widgets.cxx b/src/PVGUI/PVGUI_Module_widgets.cxx index cead1a0b..7ddee81b 100644 --- a/src/PVGUI/PVGUI_Module_widgets.cxx +++ b/src/PVGUI/PVGUI_Module_widgets.cxx @@ -69,6 +69,34 @@ #include +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" ); + 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