Since 4ad1c19166 "select all" etc no longer plays
all notes, and possibility to get a loud speaker-blasting
cacophony is greatly reduced.
We may still want to add some additional heuristics, or
special case drawing new notes/hits, but for now this it
is sensible to enable this by default.
Session::possible_states correctly filters files
and also directly returns sorted base-names.
We can remove the redundant `get_state_files_in_directory`
API now.
see also 193b35e885
Editor::motion_handler() only updates the snap-cursor
when no drags are active. While dragging, Drag::motion is
responsible to set the cursor accordingly.
In many cases the snap-cursor simply remained stuck at
the most recent position. Since in many cases
(e.g. RubberbandSelectDrag) it makes no sense to show the
cursor, so Drag::start_grab now hides the cursor by default.
This also fixes cases where the cursor is shown, but
was displayed in the wrong location.
Besides, it can happen under normal circumstances that the
Editor window, or any other window with clocks (prefs) is
visible while no session is loaded.
A rec-region is added to the streamview just like any other region
(::add_region_view_internal). This subscribes to region->DropReferences.
When the DropReferences is handled first by StreamView::remove_region_view
the corresponding RegionView is destroyed.
This can happen even while recording is still active, eg. when locating
(which stops the current recording).
MidiStreamView::setup_rec_box() is called and crashes in
`dynamic_cast<MidiRegionView*> (rec_regions.back().second);`
due to a use after free.
Strictly speaking this is a logic error in how ::setup_rec_box()
determines if to add or remove the rec-box. But due to the
asynchronous nature of signal emission and transport-state changes
the best solution is to destroy the rec-region at the same
when the RegionView is destroyed.
To reproduce:
* create a session with a MIDI track
* disconnect the input (empty MIDI regions are removed)
* Preferences > Transport > *enable* latched-record-enable
* use the Dummy backend's MIDI generator
* connect Hardware > MIDI > MMC -> Ardour misc > MMC in
OR use JACK-transport to locate while recording.
This fixes undo/redo action sensitivity for non-editor
history stack changes.
Notably recording was not undoable, because the butler
thread creates the reversible "capture" command.
Because those Widgets are added to managed frames (for search highlight)
the labels inside also need to be managed and not destroyed with the
Option (which happens first).
This fixes various GTK warnings at exit
```
gtk_widget_unparent: assertion 'GTK_IS_WIDGET (widget)' failed
```
It is not sufficient to simply drop the first source
of a region. While destroying a whole-file region marks
all its sources as unused, only the source for 1st channel
was explicitly removed.
The session accumulated <Sources>, without corresponding
whole-file Regions. Those can prevent cleanup of unused
sources, particularly when using snapshots.
* It was never called because SourceListBase::set_session
subscribed to the signal just before SessionHandle::set_session
dropped _session_connections
* remove_source() only checked the first source of the whole-file
region, not all sources of a multi-channel region.
Stereo regions with mono sources are now properly cleaned up.
* the process of tempo mapping requires/encourages you to click on the
last-known good marker, before continuing to make tempo tweaks
* this conflicts with the idea that clicking in a ruler should start a
playhead-drag. TBD. but tempo-mapping is a special and rare operation.