The undo command needs to be started before calling
playlist->add_region() because that may move automation
or include ripple changes. see the following backtrace:
```
UndoTransaction::add_command
ARDOUR::DiskReader::move_processor_automation
ARDOUR::Route::foreach_processor
ARDOUR::DiskReader::playlist_ranges_moved
ARDOUR::Playlist::flush_notifications
ARDOUR::Playlist::RegionWriteLock::~RegionWriteLock
ARDOUR::Playlist::add_region
Editor::bounce_range_selection
```
Except. it seems automation is moved incorrectly in this case..
TmpFileRt::get_samples_written() returns the number of
samples written *to disk*. It is only valid after the FileFlushed
signal is emitted.
This fixes an assert() with Limiter and Analyzer being configured
with a too low total sample-count, leading to an overflow in
the analysis graph array.
Some plugin UIs, particularly those that cannot be resized
unset `autoresizesSubviews`. Since the plugin-view is re-parented,
the host has to directly set the view's size.
However some plugins have multiple child views, apparently
for off-screen pixmaps (e.g. UAD plugins). Those additional
should not be resized (or re-stacked).
e.g.
Reason-Rack
view 0x7fe27e44e570 @ 0, 33 834 x 804
view 0x7fe288aa3770 @ 278, 268 278 x 268
UAD Tube-tech
view 0x7fe270a9cbf0 @ 0, 33 1160 x 374
view 0x7fe28883d030 @ 0, 0 1160 x 374
view 0x7fe2888546e0 @ 0, 0 1160 x 24
see also aef366c156https://discourse.ardour.org/t/uad-plugin-will-not-load-shows-as-expired-when-its-not/105756/5?u=x42
Preferences is a tabbable, a leftover artifact of when it was, in fact, intended to be a tabbable. Rather than
re-engineer this right now, add a key event handler so that Primary-w works for this just like other dialogs
1) if there is no current dialog, allow some other window to handle the keyboard event
2) make the binding (which is hard coded) visible as static members of Keyboard
When switching to Semitones, round speed to nearest semitone.
This fixes an issue when rolling forward at < 25% which is
less that -24st and then scrolling right (increase pitch).
The result may still be < -24st and playback reverses.
When changing max-speed, directly constrain speed.
Previously it was not possible to return from reverse playback
since left-scroll decreased pitch, even during reverse playback.
This also fixes an edge-case when quickly scrolling through
zero. use_shuttle_fract() ignores rapid events, map_transport_state()
can round speed to zero and next scroll-event set the default +1st
speed (really should have been 0st).This is solved by starting at
-24st, similar to how percentage does not start at 100%.