Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.7.1, 4.8.3, 5.0.0
-
None
-
54e25f3d27278b22649a35f2ffead4474f3add79 (4.8)
Description
In TabbedView mode of QMdiArea, context menu of the tabs consists of 2 actions: "Close" and "Restore". The latter is irrelevant in the TabbedView mode; clicking it results in unexpected behaviour: a mix of tabs and mdi windows is displayed.
The reason of this error resides in banal copy&paste typo in qmdiarea.cpp (line 622):
void QMdiAreaTabBar::contextMenuEvent(QContextMenuEvent *event) { ... // We don't want these actions to show up in the system menu when the // current sub-window is maximized, i.e. covers the entire viewport. if (currentSubWindow->isMaximized()) { subWindowPrivate->setVisible(QMdiSubWindowPrivate::MoveAction, false); subWindowPrivate->setVisible(QMdiSubWindowPrivate::ResizeAction, false); subWindowPrivate->setVisible(QMdiSubWindowPrivate::MinimizeAction, false); subWindowPrivate->setVisible(QMdiSubWindowPrivate::MaximizeAction, false); subWindowPrivate->setVisible(QMdiSubWindowPrivate::MaximizeAction, false); subWindowPrivate->setVisible(QMdiSubWindowPrivate::StayOnTopAction, false); }
Please notice 2 identical lines with MaximizeAction, one of them should be RestoreAction instead.