After select none, the timeline and selection times are temporarily not updated.
Fix: AudacityProject::SelectNone refreshes the TrackPanel, so call it after changing the SelectedRegion.
When the menu key is pressed, mouse events are also generated, and one of these was interpreted as a mouse click outside the tracks, which deselected the tracks.
A possible fix would have been to make a change in TrackPanel::HandleTrackSpecificMouseEvent() so that only left clicks outside of tracks would deselect tracks.
However, I decided that a better fix was to modify TrackPanel::OnMouseEvent to ignore the mouse events generated when the menu key is pressed. This should prevent these mouse events from causing bugs in any new code.
I moved type to create labels under labels.
I made the menu items for SaveAs MP3/WAV/Ogg mainstream.
Introduced EXPERIMENTAL_DA2 to deal with some colour issues.
MSVC2013 Express does not support some initialisation syntax for structs and instead gives error C2905.
This workaround to get us compiling again may need revisiting.
... Strong, meaning that the file at the specified path is created or modified
only if all write operations complete without exceptions, barring one very
unlikely possibility that a final file rename fails, but even in that case the
output is successfully written to some path.
This commit does not add throws, but changes the type thrown to a subclass of
AudacityException, so that GuardedCall will cause the user to see an error
dialog in all cases.
Duplicated logic for making temporary files and backups is now all in one
place, the class XMLWriter.
There may be more new GuardedCalls than necessary -- the catch-all for the
event loop, AudacityApp::OnExceptionInMainLoop, might be trusted instead in
some cases -- but they are sufficient.
AudacityException is an abstract base class for exceptions generated by
Audacity.
GuardedCall wraps any function (usually a lambda) in an appropriate catch
block.
It can also accept a second function that defines a catch block action, which
can rethrow or return a value for the GuardedCall.
It can also accept a third function, that defines another, delayed action that
executes in the main thread at idle time if the second function intercepts an
AudacityException and completes without rethrow.
Defaults for the second function simply return void or false. Default for the
third function invokes a virtual method of AudacityException, which for
subclass MessageBoxException, displays a message box.
... also replace explicit mutex locking with RAII and atomics.
This is a part of the big project that handles failure to write block files, as
from disk exhaustion. ODDecodeBlockFile::WriteODDecodeBlockFile is the one
place calling WriteSimpleBlockFile but not (as in SimpleBlockFile constructor)
throwing an exception.
It is called only when attempting to recover files at open time, or in worker
threads in an EXPERIMENTAL code branch.