summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Hindenburg <kurt.hindenburg@gmail.com>2012-07-20 13:19:26 (GMT)
committerKurt Hindenburg <kurt.hindenburg@gmail.com>2012-07-20 13:19:26 (GMT)
commit32af61fba86d7911e7c907998d0bbf4d8c92e710 (patch)
treee6de948c85c3896d602bd75f40b319fd2e90410c
parent69b53c00ae53d6a066292d3f1a96599a75eff618 (diff)
Leave the bookmark shortcut set to what user changed it to
Only reset the bookmark shortcut to Ctrl+Shift+B if the user didn't change it to something else. BUG: 303747 FIXED-IN: 4.10
-rw-r--r--src/MainWindow.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp
index 0f0a9d3..5f5c370 100644
--- a/src/MainWindow.cpp
+++ b/src/MainWindow.cpp
@@ -165,10 +165,14 @@ void MainWindow::correctStandardShortcuts()
Q_ASSERT(helpAction);
helpAction->setShortcut(QKeySequence());
- // replace Ctrl+B shortcut for bookmarks
+ // replace Ctrl+B shortcut for bookmarks only if user hasn't already
+ // changed the shortcut; however, if the user changed it to Ctrl+B
+ // this will still get changed to Ctrl+Shift+B
QAction* bookmarkAction = actionCollection()->action("add_bookmark");
Q_ASSERT(bookmarkAction);
- bookmarkAction->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_B));
+ if (bookmarkAction->shortcut() == QKeySequence(Qt::CTRL + Qt::Key_B)) {
+ bookmarkAction->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_B));
+ }
}
ViewManager* MainWindow::viewManager() const