computer configuration: pass current filename to dialog

Instead of accessing a global variable, pass the filename
from the MainWindow to the dialog. This is supposed to cut
down on the global variable mess.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-03-16 09:53:22 +01:00 committed by bstoeger
parent 2e067c89dd
commit 981352646c
3 changed files with 8 additions and 10 deletions

View file

@ -1395,7 +1395,8 @@ void MainWindow::on_actionExport_triggered()
void MainWindow::on_actionConfigure_Dive_Computer_triggered()
{
ConfigureDiveComputerDialog *dcConfig = new ConfigureDiveComputerDialog(this);
QString filename = existing_filename ?: prefs.default_filename;
ConfigureDiveComputerDialog *dcConfig = new ConfigureDiveComputerDialog(filename, this);
dcConfig->show();
}