summaryrefslogtreecommitdiff
path: root/client/collapser.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/collapser.cc')
-rw-r--r--client/collapser.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/client/collapser.cc b/client/collapser.cc
index 1d77c09..cbbd84e 100644
--- a/client/collapser.cc
+++ b/client/collapser.cc
@@ -31,11 +31,14 @@
#define ANIM_TIME 100
#define ANIM_INTERVAL 20
-Collapser::Collapser(QWidget *collapsed, QWidget *expanded, bool setcollapsed)
+Collapser::Collapser(QWidget *collapsed, QWidget *expanded, bool setcollapsed,
+ QScrollArea *scrollarea)
{
this->collapsed = NULL;
this->expanded = NULL;
+ this->scrollarea = scrollarea;
+
timer = new QTimer(this);
timer->setSingleShot(true);
timer->setInterval(ANIM_INTERVAL);
@@ -203,6 +206,11 @@ void Collapser::anim()
setFixedHeight(e_height);
emit doneExpanding();
+
+ if(scrollarea && expanded) {
+ scrollarea->ensureWidgetVisible(expanded);
+ }
+
}
}