mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-25 07:31:33 +08:00
Fixed wrong current index when removing a widget from CDockAreaLayout
This commit is contained in:
parent
ffed6a9c5f
commit
e36655a7ab
@ -11,6 +11,7 @@ int main(int argc, char *argv[])
|
||||
QMainWindow w;
|
||||
|
||||
ads::CDockManager::setConfigFlag(ads::CDockManager::FocusHighlighting, true);
|
||||
ads::CDockManager::setConfigFlag(ads::CDockManager::AllTabsHaveCloseButton, true);
|
||||
auto dockManager = new ads::CDockManager(&w);
|
||||
|
||||
QAction *action = new QAction("New Delete On Close", &w);
|
||||
|
@ -136,6 +136,10 @@ public:
|
||||
m_CurrentWidget = nullptr;
|
||||
m_CurrentIndex = -1;
|
||||
}
|
||||
else if (indexOf(Widget) < m_CurrentIndex)
|
||||
{
|
||||
--m_CurrentIndex;
|
||||
}
|
||||
m_Widgets.removeOne(Widget);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user