This fixes a crash when showing the same Pianoroll again,
since actions a already present, a NULL reference was pushed
to session_sensitive_actions. Closing a session then crashed
accessing a NULL Action.
While CueEditor is-a HistoryOwner, session specific
changes such as Location don't belong in EditingContext.
This fixes a heap-use-after-free crash since MementoCommand
was free()ed twice. Once via ARDOUR::Location::~Location
and earlier due to direct Destructible::drop_references
from the History.
This partially reverts 04a8fb1eb6
This happens in in Ardour's Preference dialog with
e.g. BufferingOptions:
~OptionEditorContainer deletes the Option, which in turn
deletes the Widget BufferingOptions:_buffering_presets_combo
Since the widget is not managed it is not removed from its
parent.
Later ~OptionEditorContainer disposes the page layout, which
eventually also calls the Frame d'tor, causing a heap-use-after-free.
And for now, there's only a single implementation, though other types of
drags could implement it if needed. There really seems to be no need.
Note that the x-axis threshold is 3x in the case of a copy-drag.
This was implemented to try to fix paste() but was not needed. It might be
useful in the future, or just as an expression of the logic of this. Note that
the BBT_Offset it returns only has the beats field set, which is ... odd. So
this is likely not quite finished.
the BBT times of the newly inserted points during paste() are meaningless until
we recompute them using ::reset_starting_at(). So don't try to compute some
sort of likely value, just use the value from the cut buffer, and call
reset_starting_at() after every point inserted.
A meter (time signature) is required to do the math correctly for any operation that may
cross or reach the next bar boundary, which round_to_*() and round_up_to_*() may do.
This is used to for all selection: route, plugins,
time and region and slot selection.
Only re-pack it with different expand option when
the pianoroll is also visible