when Session emits RouteAdded, each handler (editor, mixer, trigger pages etc) will
execute their callbacks in order. But Editor::add_routes() selects the routes too,
which triggers a PresentationInfo::Change signal. This is received by e.g. the Mixer
before it has even found out about the newly added stripables. This in turn
leads to severe confusion regarding the state of the selection in the mixer,
and potentially elsewhere.
So, just add a PresentationInfo::ChangeSuspender for the scope of the RouteAdde
signal emission
Initially thew new region has a length of zero (0:0). When
merging Notes from a truncated region (no explicit note-off)
those notes are lost:
"Stuck note resolution - end time @ 0:0 is before note on: @ 0:0"
Truncate (or split) a region so that a note is cut short:
```
Region [{<--Note-------->}]
```
becomes
```
Region [{<--Note--]
^ implicit note-off at region boundary
```
When combining this region with an empty Region after gap,
```
Region [{<--Note--] [ ]
```
the result should be
```
Region [{<--Note->} ]
```
For this reason, even without a gap between the regions,
the original note length must not be restored.
The result MUST NOT be the same as the original:
```
Region [{<--Note-------->}]
```
This allows UI scripts (saved in preferences) to access
os.* functions (non-sandboxed), while preventing other
scripts to do so.
Lua scripts that can run os commands can execute arbitrary
code on the system. While this is a nice feature, it can be
equally dangerous.
Without this, Editor::button_release_handler() will handle a button3 press
without checking for an active drag, resulting in two drags, and two reversible
commands, and an abort ...
Playlist::split can result in removal of a region
(adding two others instead). In this case the state
of the removed region (if modified) is not saved.