diff options
Diffstat (limited to 'client/collapser.cc')
-rw-r--r-- | client/collapser.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/client/collapser.cc b/client/collapser.cc index fcf4a1d..bb14722 100644 --- a/client/collapser.cc +++ b/client/collapser.cc @@ -105,6 +105,7 @@ void Collapser::collapse() t_anim.start(); is_collapsed = true; + killTimer(timer_id); timer_id = startTimer(ANIM_INTERVAL); } @@ -123,6 +124,7 @@ void Collapser::expand() } is_collapsed = false; + killTimer(timer_id); timer_id = startTimer(ANIM_INTERVAL); } @@ -139,18 +141,16 @@ void Collapser::anim() if(collapsed) { QSize sz = collapsed->minimumSizeHint(); c_height = sz.height(); - //c_height = collapsed->minimumHeight(); } if(expanded) { QSize sz = expanded->minimumSizeHint(); e_height = sz.height(); - //e_height = expanded->minimumHeight(); } killTimer(timer_id); - double x = (double)(t_anim.elapsed()) / ANIM_TIME; + double x = (double)(t_anim.elapsed()) / (double)ANIM_TIME; double y = 1; if(x < 1) { @@ -164,6 +164,7 @@ void Collapser::anim() } setFixedHeight(height); + killTimer(timer_id); timer_id = startTimer(ANIM_INTERVAL); } else { |