This allows the clear methods to be used before calling ::add(), to avoid the
emission of a signal saying "there are no <foo> selected right now".
There should be no side-effects from this commit.
Note that correct use of this new API is complex, and requires avoiding the use
of wrapper methods like clear_objects().
It may happen that during push_state_to_backend() a device is
reconfigured in a way that triggers a "Device Changed" callback before
the engine is started. This callback can trigger a change to the
configuration that will be used when the engine is actually started.
This has been seen on OSX in conjunction with Aggregate Devices
(even if the aggregate is not used, but the device which is used
is also part of an aggregate)
example: HW changed callback arrives, device-list is re-populated,
*A*irplay" is at the top of the list, Airplay supports only 44.1K,
Samplerate changes... later save also writes this new rate to the file.
This was triggered when reloading session and immediately duplicating range with
keyboard shortcut. As clicked_selection was uninitialized it would try to use
an invalid index into the TimeSelection.
In response to a comment in #6722, as there is little delineation between the
ruler and track canvas areas it makes sense to keep the scrolling step the same
to avoid unintended jumps in scrolling if mouse cursor moves between areas.
This means that mouse zoom scrolling behaviour is consistent on the ruler
canvas area and track canvas area.
The config option defaults to true so this means the behaviour of Mixbus will
be unchanged but in Ardour the ruler area will now follow the option so by
default will use the mouse position as zoom focus when zooming rather than the
zoom focus setting.
Keep the same scrolling distance per event as when scroll left/right is used.
Scrolling in the ruler area is different than the track canvas area which I'm
not sure is a great idea as there is not much delineation between the two areas
but as the ruler area has some other different behaviour it is probably
acceptable/useful.
Keep scroll distance consistent when scrolling up and down with horizontal
modifier as when scrolling left to right.
Scroll horizonally by half a page so that no sections of the canvas are skipped
when scrolling.
Scroll by half a page rather than a step like when scrolling in the track
canvas area as it is a summary area so larger steps seem acceptable and having
it use the same scroll distance as when scrolling in the track canvas seems
pointless as you would then just scroll in the track canvas area.