mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
selection: move dive selection, current dive and dc through signals
To reduce access of global variables. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
616dbd9671
commit
72a15c46d9
10 changed files with 47 additions and 36 deletions
|
@ -176,7 +176,7 @@ MainWindow::MainWindow() :
|
|||
if (!QIcon::hasThemeIcon("window-close")) {
|
||||
QIcon::setThemeName("subsurface");
|
||||
}
|
||||
connect(diveList.get(), &DiveListView::divesSelected, this, &MainWindow::selectionChanged);
|
||||
connect(diveList.get(), &DiveListView::divesSelected, this, &MainWindow::divesSelected);
|
||||
connect(&diveListNotifier, &DiveListNotifier::settingsChanged, this, &MainWindow::readSettings);
|
||||
for (int i = 0; i < NUM_RECENT_FILES; i++) {
|
||||
actionsRecent[i] = new QAction(this);
|
||||
|
@ -331,10 +331,10 @@ void MainWindow::updateAutogroup()
|
|||
ui.actionAutoGroup->setChecked(divelog.autogroup);
|
||||
}
|
||||
|
||||
void MainWindow::selectionChanged()
|
||||
void MainWindow::divesSelected(const std::vector<dive *> &selection, dive *currentDive, int currentDC)
|
||||
{
|
||||
mainTab->updateDiveInfo();
|
||||
if (current_dive)
|
||||
if (currentDive)
|
||||
enableDisableOtherDCsActions();
|
||||
profile->plotCurrentDive();
|
||||
#ifdef MAP_SUPPORT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue