mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Clear the data when the model resets.
This patch does a few things: 1 - reset the model when user closes the dive file 2 - connects the 'rowsAboutToBeRemoved' in a way that the graphics can remove their polygons too 3 - adds a 'clear' virtual method so items that don't follow the rules can clean themseves up. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2f2c9e371c
commit
cafc7e4b13
5 changed files with 23 additions and 0 deletions
|
@ -171,6 +171,7 @@ void MainWindow::on_actionClose_triggered()
|
|||
if (unsaved_changes() && (askSaveChanges() == false))
|
||||
return;
|
||||
|
||||
ui.graphicsView->setEmptyState();
|
||||
/* free the dives and trips */
|
||||
while (dive_table.nr)
|
||||
delete_single_dive(0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue