Audacity Bug Summary
••• Introduction •••
••• Keywords •••
    Audacity 3.0.3 development began 19th April 2021

Audacity Bugzilla



Bug 115 - Snap-to causes spurious 'toolbar' to appear momentarily at start of dragging.
Snap-to causes spurious 'toolbar' to appear momentarily at start of dragging.
Status: RESOLVED FIXED
Product: Audacity
Classification: Unclassified
Component: User Interface
1.3.11
PC Windows XP
: P4 Repeatable
Assigned To: Default Assignee for New Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-02-12 12:42 UTC by James Crook
Modified: 2018-08-20 11:51 UTC (History)
2 users (show)

See Also:
Steps To Reproduce:
Look at the top left corner of the toolbars when you start to drag with snapping enabled. Momentarily a small ctrl will appear and then disappear.
Release Note:
First Git SHA:
Group: ---
Workaround:
Closed: 2018-08-20 00:00:00


Attachments
Completes James' TimeConverter work (62.10 KB, patch)
2013-10-07 09:59 UTC, Leland Lucius
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Crook 2010-02-12 12:42:20 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.
Comment 1 James Crook 2010-02-12 13:22:52 UTC
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.
Comment 2 James Crook 2010-02-12 15:30:50 UTC
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.
Comment 3 Leland Lucius 2013-10-07 09:59:31 UTC
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.
Comment 4 Gale Andrews 2013-10-23 18:18:14 UTC
Committed by Leland in r12725.