diff options
Diffstat (limited to 'client/collapser.cc')
-rw-r--r-- | client/collapser.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/client/collapser.cc b/client/collapser.cc index bb14722..e06a5cf 100644 --- a/client/collapser.cc +++ b/client/collapser.cc @@ -25,7 +25,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #include "collapser.h" - +#include <QApplication> #include <QHBoxLayout> #define ANIM_TIME 100 @@ -59,6 +59,11 @@ void Collapser::setCollapsedWidget(QWidget *collapsed) } this->collapsed = collapsed; + + if(isCollapsed() == true && collapsed) { + layout()->addWidget(collapsed); + collapsed->setVisible(true); + } } void Collapser::setExpandedWidget(QWidget *expanded) @@ -116,6 +121,7 @@ void Collapser::expand() // show expanded if(collapsed) { collapsed->setVisible(false); + qApp->processEvents(); // Make sure it is actualle invisble before removing it form the layout. layout()->removeWidget(collapsed); } if(expanded) { @@ -164,7 +170,6 @@ void Collapser::anim() } setFixedHeight(height); - killTimer(timer_id); timer_id = startTimer(ANIM_INTERVAL); } else { @@ -172,6 +177,7 @@ void Collapser::anim() // show collapsed if(expanded) { expanded->setVisible(false); + qApp->processEvents(); // Make sure it is actualle invisble before removing it form the layout. layout()->removeWidget(expanded); } if(collapsed) { |