diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2017-02-25 21:00:09 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-03-04 12:16:49 -0800 |
commit | b60b7c108e27ed60d19932425e82db3eecbd4fde (patch) | |
tree | fd74e4dd97a3db2ee4f9b23dc1dc313ccc962940 /desktop-widgets/maintab.cpp | |
parent | e9debdf281a1a9661fb261df73446a8898be1d77 (diff) | |
download | subsurface-b60b7c108e27ed60d19932425e82db3eecbd4fde.tar.gz |
Enable manual setting of duration
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/maintab.cpp')
-rw-r--r-- | desktop-widgets/maintab.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/desktop-widgets/maintab.cpp b/desktop-widgets/maintab.cpp index fc0fb0005..d181131a8 100644 --- a/desktop-widgets/maintab.cpp +++ b/desktop-widgets/maintab.cpp @@ -1243,7 +1243,19 @@ void MainTab::on_duration_textChanged(const QString &text) { if (editMode == IGNORE || acceptingEdit == true) return; - qDebug() << "duration text changed"; + // parse this + MainWindow::instance()->graphics()->setReplot(false); + if (!isEditing()) + enableEdition(); + displayed_dive.dc.duration.seconds = parseDurationToSeconds(text); + displayed_dive.duration = displayed_dive.dc.duration; + displayed_dive.dc.meandepth.mm = 0; + displayed_dive.dc.samples = 0; + DivePlannerPointsModel::instance()->loadFromDive(&displayed_dive); + markChangedWidget(ui.duration); + MainWindow::instance()->graphics()->setReplot(true); + MainWindow::instance()->graphics()->plotDive(); + } void MainTab::on_depth_textChanged(const QString &text) |