mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile: update profile in edit mode on undo
When the user undos/redos the profile should update even when in edit mode. This is a bit more complicated than anticipated: 1) We should not do the update when emitting an undo command from the profile. But we *should* update if it is an undo command from the maintab (change depth/time). 2) The divepointsplannermodel has to be reset. Side note: the code is truly abysmal as it sends numerous changed-signals. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
5aa67c134b
commit
4c46a11ed1
3 changed files with 41 additions and 5 deletions
|
@ -213,10 +213,6 @@ void MainTab::divesChanged(const QVector<dive *> &dives, DiveField field)
|
|||
ui.buddy->setText(current_dive->buddy);
|
||||
if (field.diveguide)
|
||||
ui.diveguide->setText(current_dive->diveguide);
|
||||
|
||||
// If duration or depth changed, the profile needs to be replotted
|
||||
if (field.duration || field.depth)
|
||||
MainWindow::instance()->refreshProfile();
|
||||
}
|
||||
|
||||
void MainTab::diveSiteEdited(dive_site *ds, int)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue