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>
This commit is contained in:
Dirk Hohndel 2015-02-03 07:30:08 -08:00
parent fdb736c1e1
commit d34965135a
3 changed files with 18 additions and 13 deletions

View file

@ -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);