mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
undo: replot profile if event changed
Add a DiveListNotifer::eventsChanged signal, which is emitted when the events changed. This is very coarse, at it doesn't differentiate between signal addition / editing / deletion. We might want to be finer in the future. Catch the signal in the profile-widget to replot the dive if this is the currently displayed dive. Reuse the cylindersChanged() slot, but rename it to the now more appropriate profileChanged(). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
30c7499a3c
commit
7018783f64
4 changed files with 9 additions and 3 deletions
|
@ -23,6 +23,7 @@ void AddEventBase::redo()
|
|||
eventToRemove = eventToAdd.get();
|
||||
add_event_to_dc(dc, eventToAdd.release()); // return ownership to backend
|
||||
invalidate_dive_cache(d);
|
||||
emit diveListNotifier.eventsChanged(d);
|
||||
}
|
||||
|
||||
void AddEventBase::undo()
|
||||
|
@ -32,6 +33,7 @@ void AddEventBase::undo()
|
|||
eventToAdd.reset(eventToRemove); // take ownership of event
|
||||
eventToRemove = nullptr;
|
||||
invalidate_dive_cache(d);
|
||||
emit diveListNotifier.eventsChanged(d);
|
||||
}
|
||||
|
||||
AddEventBookmark::AddEventBookmark(struct dive *d, int dcNr, int seconds) :
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue