mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Enable manual setting of duration
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
e9debdf281
commit
b60b7c108e
1 changed files with 13 additions and 1 deletions
|
@ -1243,7 +1243,19 @@ void MainTab::on_duration_textChanged(const QString &text)
|
||||||
{
|
{
|
||||||
if (editMode == IGNORE || acceptingEdit == true)
|
if (editMode == IGNORE || acceptingEdit == true)
|
||||||
return;
|
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)
|
void MainTab::on_depth_textChanged(const QString &text)
|
||||||
|
|
Loading…
Reference in a new issue