Bugzilla – Bug 115
Snap-to causes spurious 'toolbar' to appear momentarily at start of dragging.
Last modified: 2018-08-20 11:51:33 UTC
Enable snap to, exit audacity. Start audacity. Add an audio track using DTMF. Selection on that track fails to work. The selection does not appear, and audacity appears to be stuck drawing a small toolbar in top left of screen. Disable snap to and selection works OK again, reenable it and it stops working.
Line 253 of Snap.cpp is creating a new window: TimeTextCtrl ttc(p, wxID_ANY, wxT(""), 0.0, p->GetRate()); And it does this with every tiny movement of the mouse during dragging. The 'toolbar' being drawn is this time-text control. I'm working on a fix.
I've checked in a fix for the main issue which was a new ctrl being created with every tiny drag. A TimeTextCtrl still appears momentarily when you start to drag. With this fix I've demoted this issue to P4. See line 35 of Snap.cpp for how to fix the residual issue: // TODO: Switch over from using TimeTextCtrl to TimeConverter. // This will prevent an annoying tiny toolbar appearing in top left // every time we click the mouse left button. It's the time text // ctrl.
Created attachment 407 [details] 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. 3) Due to the overlap of source changes, this patch also includes the fixes for bugs 647 and 275. 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.
Committed by Leland in r12725.