QTabBar: properly clean up move animation
In TabBarAnimation::updateState() the wrong parameter was used to determine if the animation has stopped or not. This lead to a call to moveTabFinished() when the animation started and not when it was finished. Task-number: QTBUG-42951 Change-Id: I213c7f5e863a9a4e33bd472de93933efebf63fc7 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>bb10
parent
ddfd744d83
commit
29bb28d523
|
|
@ -2682,7 +2682,7 @@ void QTabBarPrivate::Tab::TabBarAnimation::updateCurrentValue(const QVariant &cu
|
|||
priv->moveTab(priv->tabList.indexOf(*tab), current.toInt());
|
||||
}
|
||||
|
||||
void QTabBarPrivate::Tab::TabBarAnimation::updateState(QAbstractAnimation::State, QAbstractAnimation::State newState)
|
||||
void QTabBarPrivate::Tab::TabBarAnimation::updateState(QAbstractAnimation::State newState, QAbstractAnimation::State)
|
||||
{
|
||||
if (newState == Stopped) priv->moveTabFinished(priv->tabList.indexOf(*tab));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ public:
|
|||
|
||||
void updateCurrentValue(const QVariant ¤t) override;
|
||||
|
||||
void updateState(State, State newState) override;
|
||||
void updateState(State newState, State) override;
|
||||
private:
|
||||
//these are needed for the callbacks
|
||||
Tab *tab;
|
||||
|
|
|
|||
Loading…
Reference in New Issue