diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-02-03 07:30:08 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-02-03 07:36:09 -0800 |
commit | d34965135a3b3f8fd887bb1d2a6083fb2f181fb0 (patch) | |
tree | bbff5d2b7ffbadf581902f710aad8a0b33d3b9f8 /qt-ui/mainwindow.h | |
parent | fdb736c1e1ae6ba637061fe967fb8ef3ff571084 (diff) | |
download | subsurface-d34965135a3b3f8fd887bb1d2a6083fb2f181fb0.tar.gz |
Disable dive component copy/paste shortcuts when no profile show
Instead of inventing another way to do this (and inevitably forgetting a
path where this should be re-enabled) I renamed the DcShortcup related
function and made them enable/disable the copy and paste shortcuts as
well.
Of course there now is one exception (isn't there always?): in "ADD" state
we don't want to be able to switch DCs, but we do want to be able to
paste.
Fixes #825
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.h')
-rw-r--r-- | qt-ui/mainwindow.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/qt-ui/mainwindow.h b/qt-ui/mainwindow.h index 8a9d6f38b..2364caadc 100644 --- a/qt-ui/mainwindow.h +++ b/qt-ui/mainwindow.h @@ -67,10 +67,10 @@ public: void showError(QString message); void setTitle(enum MainWindowTitleFormat format); - // The 'Change DC Shortcuts' should only be enabled - // when the profile's visible. - void disableDcShortcuts(); - void enableDcShortcuts(); + // Some shortcuts like "change DC" or "copy/paste dive components" + // should only be enabled when the profile's visible. + void disableShortcuts(bool disablePaste = true); + void enableShortcuts(); void loadFiles(const QStringList files); void importFiles(const QStringList importFiles); void importTxtFiles(const QStringList fileNames); |