diff options
author | deva <deva> | 2011-04-04 09:17:03 +0000 |
---|---|---|
committer | deva <deva> | 2011-04-04 09:17:03 +0000 |
commit | 46683949163047405c55efc42fdd3c79e96cde0d (patch) | |
tree | c60229ebf98f96115a8479440011955689909806 /client/collapser.cc | |
parent | f86e3fa5d2333116b435cb7fd7bbfeb699483d12 (diff) |
Fix journal view scrollbar jumpiness. Fix scroll to view on open of new macro. Added new attribute 'type' to checkgroupbox.
Diffstat (limited to 'client/collapser.cc')
-rw-r--r-- | client/collapser.cc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/client/collapser.cc b/client/collapser.cc index caf3117..599397f 100644 --- a/client/collapser.cc +++ b/client/collapser.cc @@ -47,6 +47,9 @@ Collapser::Collapser(QWidget *current, QScrollArea *scroll) setLayout(new QHBoxLayout()); layout()->setContentsMargins(0,0,0,0); + + connect(this, SIGNAL(scrollToViewSignal()), + this, SLOT(scrollToView()), Qt::QueuedConnection); } void Collapser::updateHeight() @@ -90,6 +93,13 @@ void Collapser::animateToWidget(QWidget *widget, bool stv) timer->start(); } +void Collapser::scrollToView() +{ + if(scroll_to_view && scrollarea && current_widget) { + scrollarea->ensureWidgetVisible(current_widget); + } +} + void Collapser::anim() { double x = (double)(t_anim.elapsed()) / (double)ANIM_TIME; @@ -120,10 +130,7 @@ void Collapser::anim() setFixedHeight(placeholder.toHeight()); emit doneAnimating(current_widget); - - if(scroll_to_view && scrollarea && current_widget) { - scrollarea->ensureWidgetVisible(current_widget); - } + emit scrollToViewSignal(); } } |