diff options
Diffstat (limited to 'client/mainwindow.cc')
-rw-r--r-- | client/mainwindow.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/client/mainwindow.cc b/client/mainwindow.cc index 9436f41..bd8055e 100644 --- a/client/mainwindow.cc +++ b/client/mainwindow.cc @@ -122,10 +122,13 @@ MainWindow::MainWindow(QString patientid, QString title, QString course, QToolBar *toolbar = addToolBar("controls"); toolbar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); QAction *close_commit = toolbar->addAction(tr("Close and commit")); + close_commit->setShortcut(QKeySequence(tr("Ctrl+Alt+S"))); close_commit->setIcon(QPixmap(":icons/icon_close_commit.png")); QAction *close_no_commit = toolbar->addAction(tr("Close no commit")); close_no_commit->setIcon(QPixmap(":icons/icon_close_no_commit.png")); + close_no_commit->setShortcut(QKeySequence(tr("Ctrl+Alt+X"))); + /* QAction *close_discard = toolbar->addAction("Close discard"); close_discard->setIcon(QPixmap(":icons/icon_discard.png")); @@ -233,6 +236,11 @@ void MainWindow::closeDiscard() void MainWindow::closeEvent(QCloseEvent *event) { + if(closing) { + emit isClosing(); + return; + } + if(hasOpen(NULL)) { MessageBox::warning(this, "Close first.", "Close open macros first."); event->ignore(); |