fix (some) editing based on tempo & meter marks

After beginning an edit operation with TempoMap::write_copy(), the tempoPoint and meterPoint objects
referenced by markers are incorrect, since they refer to the original map, not the copy we are working
on. Fix this with Editor::reassociate_metric_markers()

Some instances requiring this fix may still remain
This commit is contained in:
Paul Davis 2021-04-04 17:56:58 -06:00
parent 5838bcbe7c
commit 7938d8de4f
6 changed files with 90 additions and 23 deletions

View file

@ -164,11 +164,11 @@ class TempoMarker : public ArdourMarker
void reset_tempo (Temporal::TempoPoint & t);
Temporal::TempoPoint& tempo() const { return _tempo; }
Temporal::TempoPoint& tempo() const { return *_tempo; }
void update_height_mark (const double ratio);
private:
Temporal::TempoPoint& _tempo;
Temporal::TempoPoint* _tempo;
};
class MeterMarker : public ArdourMarker
@ -179,10 +179,10 @@ class MeterMarker : public ArdourMarker
void reset_meter (Temporal::MeterPoint & m);
Temporal::MeterPoint& meter() const { return _meter; }
Temporal::MeterPoint& meter() const { return *_meter; }
private:
Temporal::MeterPoint& _meter;
Temporal::MeterPoint* _meter;
};
class BBTMarker : public ArdourMarker
@ -193,10 +193,10 @@ class BBTMarker : public ArdourMarker
void reset_point (Temporal::MusicTimePoint &);
Temporal::MusicTimePoint& point() const { return _point; }
Temporal::MusicTimePoint& point() const { return *_point; }
private:
Temporal::MusicTimePoint& _point;
Temporal::MusicTimePoint* _point;
};
#endif /* __gtk_ardour_marker_h__ */