mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 23:03:23 +00:00
Quit Subsurface with user manual window in front
Add ability to quit Subsurface with a Ctrl-Q shortcut even if the user manual window is active. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
b068ae6019
commit
126106f9b0
2 changed files with 3 additions and 1 deletions
|
@ -592,7 +592,7 @@ void MainWindow::on_actionUserManual_triggered()
|
||||||
{
|
{
|
||||||
#ifndef NO_USERMANUAL
|
#ifndef NO_USERMANUAL
|
||||||
if (!helpView) {
|
if (!helpView) {
|
||||||
helpView = new UserManual();
|
helpView = new UserManual(this);
|
||||||
}
|
}
|
||||||
helpView->show();
|
helpView->show();
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,6 +13,8 @@ UserManual::UserManual(QWidget *parent) : QMainWindow(parent),
|
||||||
|
|
||||||
QShortcut* closeKey = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), this);
|
QShortcut* closeKey = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), this);
|
||||||
connect(closeKey, SIGNAL(activated()), this, SLOT(close()));
|
connect(closeKey, SIGNAL(activated()), this, SLOT(close()));
|
||||||
|
QShortcut* quitKey = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q), this);
|
||||||
|
connect(quitKey, SIGNAL(activated()), parent, SLOT(close()));
|
||||||
|
|
||||||
QAction *actionShowSearch = new QAction(this);
|
QAction *actionShowSearch = new QAction(this);
|
||||||
actionShowSearch->setShortcut(Qt::CTRL + Qt::Key_F);
|
actionShowSearch->setShortcut(Qt::CTRL + Qt::Key_F);
|
||||||
|
|
Loading…
Add table
Reference in a new issue