mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Autogroup only when selected
Comitsf427226b3b
and43c3885249
of the undo series introduced 2 calls of autogroup_dives() without checking the autogroup global boolean. This is a bug. An import from DC (for example) then triggers an autogrouping, the divelist is autogrouped, and the UI button is off. This commit solves this. I've chosen for a guard in the autogroup_dives() that now is a no-op when called when the user did not select autogrouping. In additon, simplified the other calls to this function, as we do not need to check before calling any more. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
parent
068b01aef2
commit
ac9bab7e2f
3 changed files with 9 additions and 9 deletions
|
@ -612,8 +612,7 @@ void MainWindow::on_actionCloudstorageopen_triggered()
|
|||
if (!parse_file(fileNamePtr.data(), &dive_table))
|
||||
setCurrentFile(fileNamePtr.data());
|
||||
process_loaded_dives();
|
||||
if (autogroup)
|
||||
autogroup_dives();
|
||||
autogroup_dives();
|
||||
Command::clear();
|
||||
hideProgressBar();
|
||||
refreshDisplay();
|
||||
|
@ -1713,8 +1712,7 @@ void MainWindow::importFiles(const QStringList fileNames)
|
|||
parse_file(fileNamePtr.data(), &table);
|
||||
}
|
||||
process_imported_dives(&table, false, false);
|
||||
if (autogroup)
|
||||
autogroup_dives();
|
||||
autogroup_dives();
|
||||
Command::clear();
|
||||
refreshDisplay();
|
||||
}
|
||||
|
@ -1738,8 +1736,7 @@ void MainWindow::loadFiles(const QStringList fileNames)
|
|||
hideProgressBar();
|
||||
updateRecentFiles();
|
||||
process_loaded_dives();
|
||||
if (autogroup)
|
||||
autogroup_dives();
|
||||
autogroup_dives();
|
||||
Command::clear();
|
||||
|
||||
refreshDisplay();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue