diff options
author | deva <deva> | 2008-09-22 12:18:43 +0000 |
---|---|---|
committer | deva <deva> | 2008-09-22 12:18:43 +0000 |
commit | 29c7310559c541ed682b84756967fa24d06043ed (patch) | |
tree | b48a0bbe4c2afdf8e634e956a902276d7babb396 | |
parent | 1b9cf53926a6627b9f8ed00a8dc1f4a784e6f295 (diff) |
Made the collapser able to update its contents even though they are already exposed.
-rw-r--r-- | client/collapser.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/client/collapser.cc b/client/collapser.cc index 470db7a..fcf4a1d 100644 --- a/client/collapser.cc +++ b/client/collapser.cc @@ -28,8 +28,8 @@ #include <QHBoxLayout> -#define ANIM_TIME 250 -#define ANIM_INTERVAL 25 +#define ANIM_TIME 100 +#define ANIM_INTERVAL 20 Collapser::Collapser(QWidget *collapsed, QWidget *expanded, bool setcollapsed) { @@ -54,7 +54,7 @@ void Collapser::setWidgets(QWidget *collapsed, QWidget *expanded) void Collapser::setCollapsedWidget(QWidget *collapsed) { if(this->collapsed) { - // delete this->collapsed; + delete this->collapsed; this->collapsed = NULL; } @@ -64,11 +64,16 @@ void Collapser::setCollapsedWidget(QWidget *collapsed) void Collapser::setExpandedWidget(QWidget *expanded) { if(this->expanded) { - // delete this->expanded; + delete this->expanded; this->expanded = NULL; } this->expanded = expanded; + + if(isCollapsed() == false && expanded) { + layout()->addWidget(expanded); + expanded->setVisible(true); + } } QWidget *Collapser::collapsedWidget() |