diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-10-30 14:07:47 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-10-30 14:12:01 (GMT) |
commit | a3dbe4c00062ad78c924162841cc2d83709b1ea4 (patch) | |
tree | dab4c0536e559c8b5d9a8a13b0871a4b8471b728 /src/gui/widgets | |
parent | 6584d601f9569ce7bfc704cb604472d324dfd253 (diff) | |
download | Qt-a3dbe4c00062ad78c924162841cc2d83709b1ea4.zip Qt-a3dbe4c00062ad78c924162841cc2d83709b1ea4.tar.gz Qt-a3dbe4c00062ad78c924162841cc2d83709b1ea4.tar.bz2 |
Animations in mainwindow could sometimes misplace the tabbar
We used to not start an animation of the current geometry was already
set. The problem is that starting this animation might stop another
animation. This has to happen. Otherwise subsequent calls to animate
a widget might or might not be executed.
Reviewed-by: ogoffart
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/qwidgetanimator.cpp | 7 | ||||
-rw-r--r-- | src/gui/widgets/qwidgetanimator_p.h | 1 |
2 files changed, 0 insertions, 8 deletions
diff --git a/src/gui/widgets/qwidgetanimator.cpp b/src/gui/widgets/qwidgetanimator.cpp index f440961..4a7ae00 100644 --- a/src/gui/widgets/qwidgetanimator.cpp +++ b/src/gui/widgets/qwidgetanimator.cpp @@ -88,8 +88,6 @@ void QWidgetAnimator::animate(QWidget *widget, const QRect &_final_geometry, boo const QRect final_geometry = _final_geometry.isValid() || widget->isWindow() ? _final_geometry : QRect(QPoint(-500 - widget->width(), -500 - widget->height()), widget->size()); - if (r == final_geometry) - return; //the widget is already where it should be #ifndef QT_NO_ANIMATION AnimationMap::const_iterator it = m_animation_map.constFind(widget); if (it != m_animation_map.constEnd() && (*it)->endValue().toRect() == final_geometry) @@ -114,9 +112,4 @@ bool QWidgetAnimator::animating() const return !m_animation_map.isEmpty(); } -bool QWidgetAnimator::animating(QWidget *widget) const -{ - return m_animation_map.contains(widget); -} - QT_END_NAMESPACE diff --git a/src/gui/widgets/qwidgetanimator_p.h b/src/gui/widgets/qwidgetanimator_p.h index 68d9344..095380f 100644 --- a/src/gui/widgets/qwidgetanimator_p.h +++ b/src/gui/widgets/qwidgetanimator_p.h @@ -70,7 +70,6 @@ public: QWidgetAnimator(QMainWindowLayout *layout); void animate(QWidget *widget, const QRect &final_geometry, bool animate); bool animating() const; - bool animating(QWidget *widget) const; void abort(QWidget *widget); |