Commit 36861ec3 authored by Halla Rempt's avatar Halla Rempt
Browse files

Remove the shortcuts from the mdi window's system menu's actions

Just changing the scope isn't enough: people also want to be
able to configure the the close window action. Fortunately,
that turns out to be quite possible.

parent dd218288
......@@ -2097,20 +2097,20 @@ void KisMainWindow::subWindowActivated()
* Qt has a weirdness, it has a hardcoded shortcut added to an action
* in the window menu. We cannot change or remove it, so we should
* just disable our own shortcut in case it conflicts with the hardcoded
* shortcut.
* Qt has a weirdness, it has hardcoded shortcuts added to an action
* in the window menu. We need to reset the shortcuts for that menu
* to nothing, otherwise the shortcuts cannot be made configurable.
* See:
QMdiSubWindow *subWindow = d->mdiArea->currentSubWindow();
if (subWindow) {
QMenu *menu = subWindow->systemMenu();
if (menu) {
Q_FOREACH (QAction *action, menu->actions()) {
if (action->shortcut() == d->close->shortcut()) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment