mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Desktop: Enable next/prev DCs only for applicable dives
Does not solve any problem, but might help users that are confused about the next/prev DC menu items, to select a different profile for the currently selected dive. So, enable these menu items only for dives where more than one DC is used. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
parent
ac9bab7e2f
commit
0f9edf06e2
2 changed files with 9 additions and 0 deletions
|
@ -457,6 +457,13 @@ void MainWindow::enableDisableCloudActions()
|
|||
ui.actionCloudstoragesave->setEnabled(prefs.cloud_verification_status == qPrefCloudStorage::CS_VERIFIED);
|
||||
}
|
||||
|
||||
void MainWindow::enableDisableOtherDCsActions()
|
||||
{
|
||||
bool nr = number_of_computers(current_dive) > 1;
|
||||
ui.actionNextDC->setEnabled(nr);
|
||||
ui.actionPreviousDC->setEnabled(nr);
|
||||
}
|
||||
|
||||
void MainWindow::setDefaultState() {
|
||||
setApplicationState("Default");
|
||||
if (mainTab->getEditMode() != MainTab::NONE) {
|
||||
|
@ -530,6 +537,7 @@ void MainWindow::selectionChanged()
|
|||
graphics->plotDive(nullptr, false, true);
|
||||
mainTab->updateDiveInfo();
|
||||
configureToolbar();
|
||||
enableDisableOtherDCsActions();
|
||||
MapWidget::instance()->reload();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,6 +77,7 @@ public:
|
|||
bool inPlanner();
|
||||
NotificationWidget *getNotificationWidget();
|
||||
void enableDisableCloudActions();
|
||||
void enableDisableOtherDCsActions();
|
||||
void setCheckedActionFilterTags(bool checked);
|
||||
void enterEditState();
|
||||
void exitEditState();
|
||||
|
|
Loading…
Add table
Reference in a new issue