mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-23 15:02:56 +02: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:
@@ -55,14 +55,13 @@ void TimeDialog::PopulateOrExchange(ShuttleGui &S)
|
||||
mTimeCtrl = new
|
||||
TimeTextCtrl(this,
|
||||
wxID_ANY,
|
||||
wxT(""),
|
||||
mFormat,
|
||||
mTime,
|
||||
mRate,
|
||||
wxDefaultPosition,
|
||||
wxDefaultSize,
|
||||
true);
|
||||
mTimeCtrl->SetName(mPrompt);
|
||||
mTimeCtrl->SetFormatString(mTimeCtrl->GetBuiltinFormat(mFormat));
|
||||
S.AddWindow(mTimeCtrl);
|
||||
mTimeCtrl->EnableMenu();
|
||||
}
|
||||
|
Reference in New Issue
Block a user