mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-02 11:49:33 +01:00
Despite comments already in the code, the logic used to remove a
{Tempo,Meter,BarTime} point from the _points list was incorrect. While it is
true that we can use a duple of (type,time) to find a given point,
::remove_point() was not doing that and instead assumed just the time value
could be used.
This meant that if you placed a tempo and meter at the same point in time, then
changed one of them, ::remove_point() could remove the wrong point from the
_points list.
In #10063 this manifests as the wrong grid being drawn after a tempo point
edit.
This commit alters the ::core_remove_xxx() methods to return a pointer to the
actual Point object that was removed from {_tempos,_meters,_bartimes} and then
we pass that to ::remove_point() for lookup and removal by address.
It also "fixes" a couple of instances of ::core_remove_xxx() without any
removal from the _points list (since ::core_remove_tempo() and
::core_remove_meter() do not do this; ::core_remove_bartime() does,
however). It is not immediately obvious what bad behavior would arise from the
existing code in these cases, but it seems clearly incorrect that the _points
list would contain points no longer present in _tempos or _meters.
|
||
|---|---|---|
| .. | ||
| MSVCtemporal | ||
| temporal | ||
| test | ||
| bbt_time.cc | ||
| beats.cc | ||
| debug.cc | ||
| domain.cc | ||
| enums.cc | ||
| range.cc | ||
| superclock.cc | ||
| tempo.cc | ||
| test.cc | ||
| test2.cc | ||
| time.cc | ||
| timeline.cc | ||
| wscript | ||