... Preserving existing behavior, but maybe these cases should be reconsidered
and made more uniform. (e.g. should hit test on NoteTrack sometimes miss, as
with WaveTrack?)
Also made details of WaveTrack hit testing consistent with what ClipMenus does
... in TimeShiftHandle. They do nothing useful yet, but responsibilities
will shift into them.
TypeSwitch is avoided and the subclasses are defined in appropriate places
for dependency management, thanks to AttachedVirtualFunction.
one taking candidate list directly, the others delegating to it.
Some members removed, some in-class initializers.
The special constructor for TimeShift only has extra arguments. It will go
away.
... Start Audacity; generate some noise; shift clip with Time-Shift tool;
command+Q to exit; say No to save changes.
The scope of a GuardedCall needs to be expanded, because Conn() can throw,
so that no exceptions escape the destructor of SqliteSampleBlock.
But now there is an error dialog on exit instead of a crash.
The error icon was gone because we are now using the ErrorDialog, which didn't have it. So added back explicitly. I decided to go with wxART_WARNING rather than wxART_ERROR because nearly all of these present as warnings.
... Implemented giving the Multi-view choice the special implementation that it
needs.
The "multi" choice is always last in the preference and in the command editing
drop-down menus, but that could be changed.
Multi-view should not be treated as another registered kind of sub-view on par
with others. This would complicate the implementation in worse ways.
... You may see this also when abandoning lots of redo history, and not only
when doing compaction.
If in compaction you discard much undo and also much redo, you may see two
progresses.
It's debatable whether this might have been better implemented by reuse of
ProjectFileIO::DeleteBlocks instead, putting callbacks to a progress indicator
in the function InSet(). But I wanted to avoid more dependency onto
ProjectFileIO.
Doing real work in DeleteBlocks() is supposed to happen only if there is a bug
elsewhere that allowed orphans. So, still no progress indicator there.
... Do so by lowering the usage of TransactionScope into UndoManager, so that
deletion of blocks is more often grouped into a transaction, as when invoking
Compact via the menu item.