From: abn Date: Thu, 13 Nov 2014 08:05:50 +0000 (+0100) Subject: Restoring Animation Widget hack to have the "plus" icon X-Git-Tag: V7_5_0rc1~1^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ea20d256386c2c83a9d7c20c06b978a7d009b9b1;p=modules%2Fparavis.git Restoring Animation Widget hack to have the "plus" icon properly displayed. Bug should be fowarded upstream to KitWare. --- 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