Fix minor UI problem in tabs transitions/animations when we close a tab

This commit is contained in:
David Capello 2015-06-15 12:15:23 -03:00
parent 1af22f1ab7
commit 29c5580c9e

View File

@ -122,6 +122,9 @@ void Tabs::removeTab(TabView* tabView, bool with_animation)
m_selected.reset();
}
if (with_animation)
resetOldPositions();
TabsListIterator it =
std::find(m_list.begin(), m_list.end(), tab);
ASSERT(it != m_list.end() && "Removing a tab that is not part of the Tabs widget");
@ -134,7 +137,6 @@ void Tabs::removeTab(TabView* tabView, bool with_animation)
tab->modified = m_delegate->isTabModified(this, tabView);
tab->view = nullptr; // The view will be destroyed after Tabs::removeTab() anyway
resetOldPositions();
startAnimation(ANI_REMOVING_TAB, ANI_REMOVING_TAB_TICKS);
}