mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Keep the dive list disabled if editing a dive
When, in a dive edit mode user entered a dive site and went to dive site edit mode then finished the ds edit, the app would lose the disabled property of the dive list, making it possible to select a new dive when we where editing another one, complete mess. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
fc6d819616
commit
b8a09ca520
3 changed files with 9 additions and 0 deletions
|
@ -851,6 +851,11 @@ void MainTab::reload()
|
||||||
mydive->what = copy_string(displayed_dive.what); \
|
mydive->what = copy_string(displayed_dive.what); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MainTab::EditMode MainTab::getEditMode() const
|
||||||
|
{
|
||||||
|
return editMode;
|
||||||
|
}
|
||||||
|
|
||||||
#define EDIT_VALUE(what) \
|
#define EDIT_VALUE(what) \
|
||||||
if (mydive->what == cd->what || copyPaste) { \
|
if (mydive->what == cd->what || copyPaste) { \
|
||||||
mydive->what = displayed_dive.what; \
|
mydive->what = displayed_dive.what; \
|
||||||
|
|
|
@ -100,6 +100,7 @@ slots:
|
||||||
void enableGeoLookupEdition();
|
void enableGeoLookupEdition();
|
||||||
void disableGeoLookupEdition();
|
void disableGeoLookupEdition();
|
||||||
void setCurrentLocationIndex();
|
void setCurrentLocationIndex();
|
||||||
|
EditMode getEditMode() const;
|
||||||
private:
|
private:
|
||||||
Ui::MainTab ui;
|
Ui::MainTab ui;
|
||||||
WeightModel *weightModel;
|
WeightModel *weightModel;
|
||||||
|
|
|
@ -258,6 +258,9 @@ PlannerSettingsWidget *MainWindow::divePlannerSettingsWidget() {
|
||||||
|
|
||||||
void MainWindow::setDefaultState() {
|
void MainWindow::setDefaultState() {
|
||||||
setApplicationState("Default");
|
setApplicationState("Default");
|
||||||
|
if (information()->getEditMode() != MainTab::NONE) {
|
||||||
|
ui.bottomLeft->currentWidget()->setEnabled(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::setLoadedWithFiles(bool f)
|
void MainWindow::setLoadedWithFiles(bool f)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue