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
|
@ -5,6 +5,7 @@
|
|||
#define PROFILEWIDGET_H
|
||||
|
||||
#include "ui_profilewidget.h"
|
||||
#include "core/subsurface-qt/divelistnotifier.h"
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
@ -27,6 +28,7 @@ public:
|
|||
void setEnabledToolbar(bool enabled);
|
||||
private
|
||||
slots:
|
||||
void divesChanged(const QVector<dive *> &dives, DiveField field);
|
||||
void unsetProfHR();
|
||||
void unsetProfTissues();
|
||||
void stopAdded();
|
||||
|
@ -48,6 +50,7 @@ private:
|
|||
std::unique_ptr<dive, DiveDeleter> editedDive;
|
||||
int editedDc;
|
||||
dive *originalDive;
|
||||
bool placingCommand;
|
||||
};
|
||||
|
||||
#endif // PROFILEWIDGET_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue