mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-13 08:06:32 +01:00
Bug 115 - Snap-to causes spurious 'toolbar' to appear momentarily at start of dragging.
Completes James' TimeConverter work
This completes the work that James started. It moves most of the non-GUI
related processing from TimeTextCtrl to James' TimeConverter class.
Other changes include:
1) TimeTextCtrl now expects the format name instead of the format string to be
passed when creating a new instance. I found that almost all cases created the
instance with a blank format string and then set the string after creation.
2) To simplify maintenance and prevent a possible discrepancy between the two,
Increase() and Decrease() were merged into a single routine.
As a result:
1) All cases where a TimeTextCtrl was being used to extract information and
not actually display a control have been changed to use TimeConverter instead.
2) All cases where TimeTextCtrl was being created with an empty format and
then immediately followed by something like this:
tt.SetFormatString(tt.GetBuiltinFormat(c->GetFormat()))
have been changed to pass the format name instead of the format string when
creating the TimeTextCtrl instance.
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include "WaveClip.h"
|
||||
#include "WaveTrack.h"
|
||||
#include "UndoManager.h" //JKC: Included for PUSH_XXX definitions.
|
||||
#include "widgets/TimeTextCtrl.h"
|
||||
|
||||
class wxMenu;
|
||||
class wxRect;
|
||||
@@ -601,6 +602,8 @@ protected:
|
||||
wxInt64 mSnapRight;
|
||||
bool mSnapPreferRightEdge;
|
||||
|
||||
TimeConverter mConverter;
|
||||
|
||||
Track * mDrawingTrack; // Keeps track of which track you are drawing on between events cf. HandleDraw()
|
||||
int mDrawingTrackTop; // Keeps track of the top position of the drawing track.
|
||||
sampleCount mDrawingStartSample; // sample of last click-down
|
||||
|
||||
Reference in New Issue
Block a user