aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-02 12:58:41 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-03 09:37:55 -0700
commit635a7ab77171e9789f13accfa5904afe27460f70 (patch)
tree804c5d34b3a446f6b2b5d672b10fe6355c188607 /qt-ui
parent2a55e55868870731258fe2230321ed23bc0cbaed (diff)
downloadsubsurface-635a7ab77171e9789f13accfa5904afe27460f70.tar.gz
UI restructure: updateDiveInfo shows the selected dive by default
So don't be redundant. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/maintab.cpp2
-rw-r--r--qt-ui/mainwindow.cpp8
-rw-r--r--qt-ui/profile/profilewidget2.cpp2
-rw-r--r--qt-ui/subsurfacewebservices.cpp2
4 files changed, 7 insertions, 7 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 2cc994a1c..d461de5a2 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -879,7 +879,7 @@ void MainTab::rejectChanges()
MainWindow::instance()->globe()->reload();
if (lastMode == MANUALLY_ADDED_DIVE) {
// more clean up
- updateDiveInfo(selected_dive);
+ updateDiveInfo();
MainWindow::instance()->showProfile();
// we already reloaded the divelist above, so don't recreate it or we'll lose the selection
MainWindow::instance()->refreshDisplay(false);
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 4e5ea56dc..219d14803 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -176,7 +176,7 @@ void MainWindow::current_dive_changed(int divenr)
ui.globe->centerOnCurrentDive();
}
ui.newProfile->plotDive();
- ui.InfoWidget->updateDiveInfo(divenr);
+ ui.InfoWidget->updateDiveInfo();
}
void MainWindow::on_actionNew_triggered()
@@ -409,7 +409,7 @@ void MainWindow::createFakeDiveForAddAndPlan()
ui.ListWidget->unselectDives();
ui.ListWidget->reload(DiveTripModel::CURRENT);
ui.ListWidget->selectDives(QList<int>() << dive_table.nr - 1);
- ui.InfoWidget->updateDiveInfo(selected_dive);
+ ui.InfoWidget->updateDiveInfo();
}
void MainWindow::removeFakeDiveForAddAndPlan()
@@ -651,7 +651,7 @@ void MainWindow::on_actionPreviousDC_triggered()
unsigned nrdc = number_of_computers(current_dive);
dc_number = (dc_number + nrdc - 1) % nrdc;
ui.newProfile->plotDive();
- ui.InfoWidget->updateDiveInfo(selected_dive);
+ ui.InfoWidget->updateDiveInfo();
}
void MainWindow::on_actionNextDC_triggered()
@@ -659,7 +659,7 @@ void MainWindow::on_actionNextDC_triggered()
unsigned nrdc = number_of_computers(current_dive);
dc_number = (dc_number + 1) % nrdc;
ui.newProfile->plotDive();
- ui.InfoWidget->updateDiveInfo(selected_dive);
+ ui.InfoWidget->updateDiveInfo();
}
void MainWindow::on_actionFullScreen_triggered(bool checked)
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index f9f019542..05f592ab8 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -1055,7 +1055,7 @@ void ProfileWidget2::changeGas()
add_gas_switch_event(d, get_dive_dc(d, diveComputer), seconds, get_gasidx(d, &gasmix));
// this means we potentially have a new tank that is being used and needs to be shown
fixup_dive(d);
- MainWindow::instance()->information()->updateDiveInfo(selected_dive);
+ MainWindow::instance()->information()->updateDiveInfo();
mark_divelist_changed(true);
replot();
}
diff --git a/qt-ui/subsurfacewebservices.cpp b/qt-ui/subsurfacewebservices.cpp
index f545345d5..27a56ec1f 100644
--- a/qt-ui/subsurfacewebservices.cpp
+++ b/qt-ui/subsurfacewebservices.cpp
@@ -342,7 +342,7 @@ void SubsurfaceWebServices::buttonClicked(QAbstractButton *button)
mark_divelist_changed(true);
MainWindow::instance()->globe()->repopulateLabels();
MainWindow::instance()->globe()->centerOnCurrentDive();
- MainWindow::instance()->information()->updateDiveInfo(selected_dive);
+ MainWindow::instance()->information()->updateDiveInfo();
}
/* store last entered uid in config */