# # # patch "src/view/dialogs/Dialog.cpp" # from [23ad75a7241adc3bc0ffdbe0601a75c678eb5c62] # to [7c10962d1af8af6f21b89d61e44efb5e24229bc4] # ============================================================ --- src/view/dialogs/Dialog.cpp 23ad75a7241adc3bc0ffdbe0601a75c678eb5c62 +++ src/view/dialogs/Dialog.cpp 7c10962d1af8af6f21b89d61e44efb5e24229bc4 @@ -68,43 +68,10 @@ int Dialog::execDocumentModal() MainWindow * wnd = qobject_cast(parent); I(wnd); - // disable the close button's functionality in the MainWindow - wnd->disableClosing(); - - QMap enableState; - - // disable all menu actions (for some reason disabling the menuBar itself - // does not result in the desired effect under OSX) - QList list = wnd->menuBar()->actions(); - foreach(QAction * act, list) - { - QList innerList = act->menu()->actions(); - foreach(QAction * innerAct, innerList) - { - // skip actions which are later placed into the application menu - // on OSX or serve other special purposes - if (innerAct->menuRole() != QAction::NoRole && - innerAct->menuRole() != QAction::TextHeuristicRole) - continue; - - enableState.insert(innerAct, innerAct->isEnabled()); - innerAct->setEnabled(false); - } - } - show(); SignalWaiter waiter(this, SIGNAL(finished(int))); waiter.wait(); - // restore the enable state for all items - foreach(QAction * act, enableState.keys()) - { - act->setEnabled(enableState.value(act)); - } - - // enable the close button's functionality in the MainWindow again - wnd->enableClosing(); - return result(); }