summaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-12-03 21:25:20 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-12-03 18:48:17 -0800
commit9190c97a3c2c9c73f0a351e7478077b057993955 (patch)
tree44af7c497c39e09f6402ebdc4926b1698a07fd22 /qt-ui/mainwindow.cpp
parentd128b74a8a05fda4cd43583ecc2323fd2d38f032 (diff)
downloadsubsurface-9190c97a3c2c9c73f0a351e7478077b057993955.tar.gz
Attempt to fix the 'click goes to 0,0' thing on the globe.
This patch attempts to fix the 'click goes to 0,0' bug on the globe. it moves a bit of code around and I particulary don't like the way that we are dealing with 'EditMode', I think I'll refactor that for 4.1. We are alredy dealing with a bunch of states, maybe a State Machine will help on removing code-complexity. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 101219725..ee77fc72d 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -295,6 +295,9 @@ void MainWindow::on_actionAddDive_triggered()
struct dive *dive = alloc_dive();
dive->when = QDateTime::currentMSecsSinceEpoch() / 1000L + gettimezoneoffset();
dive->dc.model = "manually added dive"; // don't translate! this is stored in the XML file
+
+ dive->latitude.udeg = 0;
+ dive->longitude.udeg = 0;
record_dive(dive);
// this isn't in the UI yet, so let's call the C helper function - we'll fix this up when
// accepting the dive
@@ -306,7 +309,7 @@ void MainWindow::on_actionAddDive_triggered()
ui.infoPane->setCurrentIndex(MAINTAB);
DivePlannerPointsModel::instance()->clear();
DivePlannerPointsModel::instance()->createSimpleDive();
- refreshDisplay();
+ ui.ListWidget->reload(DiveTripModel::CURRENT);
}
void MainWindow::on_actionRenumber_triggered()