mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
QML UI: ensure that after a dive edit the profile is redrawn
Normally this is triggered when the DiveDetailsView component is completed, but since QML isn't recreating this component unless we switch to a dive a couple of spots in the dive list away from this one, we wouldn't get any changes in the data reflected in the profile. But since this now redraws the same dive that potentially was drawn last, we need to make sure we call plotDive() with force=true. I also suspect that this could help with the strange bug that sometimes we show a blank profile after certain edits. See #1013 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
10af45d6dc
commit
2bf6f4e45d
2 changed files with 4 additions and 1 deletions
|
@ -53,7 +53,7 @@ void QMLProfile::setDiveId(const QString &diveId)
|
|||
if (!d)
|
||||
return;
|
||||
qDebug() << "setDiveId called with valid dive" << d->number;
|
||||
m_profileWidget->plotDive(d);
|
||||
m_profileWidget->plotDive(d, true);
|
||||
}
|
||||
|
||||
qreal QMLProfile::devicePixelRatio() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue