summaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2014-12-30 22:32:10 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-12-30 15:59:53 -0800
commitf3446fadc164b5531847bf591b80d46a17f9c393 (patch)
treeefbca3056537919685d1d6d5708bc715fc10c182 /qt-ui/mainwindow.cpp
parentac067fb42414627835efe682615a92f754eb1a08 (diff)
downloadsubsurface-f3446fadc164b5531847bf591b80d46a17f9c393.tar.gz
Clear DC information when closing log file
Fixes #799 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 5a35b1366..c578cb3d1 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -283,6 +283,10 @@ void MainWindow::closeCurrentFile()
mark_divelist_changed(false);
clear_events();
+
+ QList<DiveComputerNode> values = dcList.dcMap.values();
+ for (int i = 0; i < values.size(); i++)
+ dcList.rmDC(values.at(i).model, values.at(i).deviceId);
}
void MainWindow::on_actionClose_triggered()