mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Move resetting of current file out of clear_dive_file_data()
This is the only case where C-code sets the current file.
Remove this call for a better separation of C-backend and
C++-frontend parts.
There were four callers of clear_dive_file_data(). Two of them
would call set_filename() anyway. For the remaining two add an
explicit call to set_filename().
This commit fixes a bug introduced in commit b3901aa8f9
:
The cloud-online menu entry was still enabled after "closing" the
cloud storage.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
35b5b9282f
commit
099662023c
3 changed files with 2 additions and 3 deletions
|
@ -746,6 +746,7 @@ void MainWindow::closeCurrentFile()
|
|||
/* free the dives and trips */
|
||||
clear_git_id();
|
||||
clear_dive_file_data();
|
||||
setCurrentFile(NULL);
|
||||
cleanUpEmpty();
|
||||
mark_divelist_changed(false);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue