diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-01-29 14:00:19 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-01-29 14:00:19 -0800 |
commit | cd992bd14a292ae7117b40e1c1d6d99660d2e2da (patch) | |
tree | f952529a8dbf021912ed33ddc4a1cb4ca163902e /qt-ui | |
parent | 4e40872fc0ec5df8fd24e71e142f79ce5333307e (diff) | |
download | subsurface-cd992bd14a292ae7117b40e1c1d6d99660d2e2da.tar.gz |
Don't reimplement the clear() method
Much easier and clearer.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/mainwindow.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index d13585788..3b7333619 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -300,9 +300,7 @@ void MainWindow::closeCurrentFile() 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); + dcList.dcMap.clear(); } void MainWindow::on_actionClose_triggered() |