The two commands are "selection to next label" and "selection to previous label".
They have default shortcuts alt+right and alt+left.
A label track does not have to be the focus. If there is a single label track in the project, that it used. If there is more than one label track, then the first label track, if any, starting at the focused track is used.
If the commands are used during playback of the project, playback continues from the new cursor/selection.
The commands provide feedback to screen readers: the name of the label, and position in the form of "i of n".
I also took the opportunity to modifier the Status Bar indications when in the TrackInfo.
1) We now mention ctrl click can select or deselect track.
2) If there is only one track, we don't now prompt about rearranging tracks, since you can't.
3) If you hover in a label track's VRuler (which is just a spacer so that things line up), you now don't get a message.
Progresses us a little towards closing. Ctrl-Click on waveform now removes track selection status, not just adds it, and we don't flicker on again subsequently when we drag. Ctrl-Click won't remove the last remaining selection (by design). Shift-Click can now reduce us down to one track, rather than the previous behaviour when reducing track selection.
Problem was that cfd7648fce fixed a memory leak
but created a dangling pointer bug, which does not happen during usual run
of Audacity because AudacityProject::OnCloseWindow is reached then before
destroying AudacityProject.
Fixed it by using a std::shared_pointer for the TrackList that both
AudacityProject and TrackPanel must use.
The function builds pop up menus that are never displayed and
creates runtime debug warnings. It is left over from PRL's experiment
in 2.1.2 with a context menu for the vertical ruler.
... See comments #1 and #2 at
http://bugzilla.audacityteam.org/show_bug.cgi?id=1331
Don't make strange undo history if, e.g., R to record (or other keystroke
with undoable effects) interrupts a drag with undoable effects (like time
shift). Ensure that by first simulating a mouse button up event to stop the
drag, before dispatching the keystroke.
Don't crash if certain other drags, that do not have undoable effects, such
as selection or vertical ruler drag -- are interrupted by a keystroke
command (Ctrl+C in particular could cause crash). However, in these cases,
the drag is still allowed to continue.
... activated by clicking near the left end of the ruler, then using the
context menu.
This is not finished work, but a proof of concept for a possible new scrubbing
UI.
... So it does not depend on the focused window, and can work when selection
toolbar has focus. But TrackPanel's escape handling may still take precedence
over it.
... for functions in final classes.
override is like const -- it's not necessary, but it helps the compiler to
catch mistakes.
There may be some overriding functions not explicitly declared virtual and I did
not identify such cases, in which I might also add override.
... Should have no effect on generated code, except perhaps some slight faster
virtual function calls. Mostly useful as documentation of design intent.
Tried to mark every one of our classes that inherits from another, or is a
base for others, or has abstract virtual functions, and a few others besides.
... When you click in a stereo clip, move the correct partner clip with it.
When you click in the selection and it spans clips, move all clips containing
any part of the selection. (As horizontal dragging does.) Even if these are
not all within the same stereo track.
I implemented this rule: If any clip moves up (or down) by n audio tracks
(not counting the label tracks), all clips must move the same number, and
all must move from mono to mono or left to left or right to right. If that
is not possible, no move happens.
... first: suspend scrubbing only when the application is deactivated -- not
necessarily when track panel loses focus; resume when reactivated.
second: click and drag to seek happens only when the pointer is in the track
panel, and either over a wave track, or over no track.
... the preference is independent of those in Interface and Recording
preferences, which affect meters, sound activated recordings, time track,
and Plot Spectrum
* master:
fewer #includes in TrackPanel.cpp
Fix spacing on comment
Add output gain control to Phaser effect
Add output gain control to Wahwah effect
Bug1115: click below vertical ruler deselects track now, just as...
Rename some variables
Save overwrite choice in Export Multiple
... Also removes the conflict at top menu level over M accelerator.
Make one Channel sub-menu for mono and one for stereo, and swap correct one
in, whenever the parent menu opens.
... Verified that this works for presses on tool buttons, and keys A, D, F1,
..., F6.
Also fix conditional compilation with EXPERIMENTAL_SCRUBBING_BASIC not defined.
... And it resumes if Audacity regains focus.
Actually this fix causes pausing and resuming depending on whether Track Panel
has focus, so clicks in other parts of the Audacity window may also pause the
scrubbing. I hope that is acceptable.
This removes the TrackInfo's slider "cache".
Originally, the cache would build to the maximum number of tracks you
had created in an Audacity session. So, if you created 128 tracks
and then reduced that to 1, you'd still have 256 sliders, 1 gain and
1 pan per track.
But, the only real thing the cache did was prevent continuous allocations
of sliders since the allocated sliders position and values wer still
being updated nearly with ever interaction since they were redrawn each
time.
In April 2010, the slider cache was changed to reduce its size by
creating a sort of ring buffer based on how many tracks were displayed
and how many tracks were in the project (I guess). Unfortunately, it
didn't really handle large number of tracks and this bug was born.
While trying to find the proper fix for this, I realized that the
cache really wasn't saving anything. Maybe a little when dragging
the thumb, but during normal track redraws and interaction, it really
didn't serve a purpose, other than use additional memory.
So, I've removed the cache and have allocated a single gain and a
single pan slider. As before, their position and value are changed
as needed when drawn and manipulated.
Bug 937 was a consequence of mouse capture for drag, which no longer happens.
Scrubbing starts with ctrl- (or cmd-) left- (double-) click, after which mouse
movement and shift key and scroll wheel (undepressed) govern scrubbing. No
buttons need be held. Another ctrl/cmd-left click can stop scrubbing, and so
can SPACE or Stop button or other commands that stop normal playback.
I've added code that now treats sample editing as another kind of mouse capturing activity (IsAdjustingSample). We will now not undo or redo whilst mouse is captured. Does not depend on what key binding is used for redo/undo.
EXPERIMENTAL_SCRUBBING_BASIC enables middle-click-drag to scrub, or to seek
when shift is down.
EXPERIMENTAL_SCRUBBING_SMOOTH_SCROLL adds middle-double-click-drag to
scrub or (with SHIFT down) to seek while keeping the playhead at the midline
of the track display.
EXPERIMENTAL_SCRUBBING_SCROLL_WHEEL allows control wheel to vary the speed
limit, while scrubbing (not seeking).
All three are enabled in this commit.
Also notice the changes to status bar messages and the Mouse Preferences dialog.
Scrubbing works only in Select and Multi tools.
For now, let it abort vertical scale zoom
(any mouse button in any tool, in the vertical ruler)
and horizontal zoom
(any mouse button in the zoom tool or right mouse button in the multi tool,
in the wave display)
Should any other drags be escapable too?
Time shifting? That would need some more work to restore initial state.
A 4hr track used to take about 20s to cut a few samples. This is now significantly improved, to around 3s. Leland did this by
(a) moving the size calculation to when we examine the undo history, so it isn't slowing down the edits.
(b) in size calculation, using sizes that are cached rather than going to disk to find the sizes.
(c) writing the autosave file which is to an FFIle to a string first, i.e. using XMLStringWriter as a buffer for XMLFileWriter.
Step (c) may also make autosave marginally safer, as the risk of a partially updated autosave file is reduced.
These are mostly under an EXPERIMENTAL_ #ifdef. Also has a change for the prompt string for preferences so the displayed keybinding is adjusted when in multitool mode.
This also now shows a new green 'play cursor' when ctrl is held down on wave track, and shift being held down is signalled by a cursor change to finger-pointer too.
I also accidentally enabled EXPERIMENTAL_MIDI_OUT. We may disable that in December for release. Leaving it in for now.
ESC Key toggles snapping of center frequency to peaks (no visual indication of snap to yet)
Description added to mouse prefs - fix later.
Shift now required to keep top/bottom frequency pinned whilst (re)dragging the other one.
Code for status bar messages simplified and made more consistent, and no longer hard codes assumption that preferences is Ctrl-P when prompting user about it.
This relies on three new nyquist scripts to actually do the editing. The peak-snapping code in FrequencyWindow has been extracted into a new class, SpectrumAnalyst, to provide peak-snapping in spectrogram too.
This change is believed to be a direct refactoring that does not change functionality. It paves the way for more complex kinds of selection, such as selections involving frequency as well as time. It also reduces risk of left and right edges being swapped in future code using SelectedRegion, as the default is to swap on assignment if needed.
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 is part 1...
Provides some relief to the selection "hang"
This patch adds the ability for the keyboard based commands (like cursor left,
extend selection right, etc.) to know when the key has been released.
When the patch is applied the current state is saved only when the key is
released and not every time it repeats.
Here's an example of the difference it makes.
This video show the selection "hang", but also watch the CPU usage. All I'm
doing is pressing SHIFT+RIGHT ARROW.
http://youtu.be/tdMntDwGSkM
This one is the same thing bug with the patch applied. Notice that the
selection "hang" no longer occurs and look at the CPU usage!
http://youtu.be/EpXNsQ4Cky0
Undoes Roger's fixes for bug 255/148, as this was one component of the bug.
This fix restores TrackPanel::RefreshTrack to using a cliprect instead of doing an entire refresh.
It does it by using a repair flag in TrackPanel::DoDrawIndicator that does not advance the indicator time (so the only place the time can advance is in OnTimer)
I tested to make sure both bugs were okay after my fix.
This fix may restore usability enough to resolve the bug, but I note that there are other potential optimizations we can make, discussed on the bug 406 bugzilla comments.
Further shrink minimize button width and center the button in the TrackInfo, so there's a blank to left and blank-or-sync-lock-icon to right, so track can be selected easily even when minimized.
(TrackInfo::DrawBordersWithin) Instead of gray line spanning TrackInfo at top of minimize button, draw it just the width of the button, and add one to the left of the minimize button.
Separate sync-lock icon drawing from minimize button drawing.
Make some magic numbers become named constants.
Some renames for clarity. Clean up some unused stuff.
Change sync-lock tile and icons to be clock instead of chain link. (Yet to change sync-lock button image.)
Make click on sync-lock icon select track.
Remove bevels on regions holding controls, so that bevels are only on controls themselves. This removes confusing border line above sync-lock icon, and simplifies the TrackInfo.
Be more specific about class methods vs stand-alone functions in comments.
Commented out the one call to TrackInfo::DrawBordersWithin(). This eliminates all the dark lines within the TrackInfo, in an effort to make the sync-lock icon not look like a button. It leaves some lighter borders, and I think that's an aesthetic improvement, though it make be worse in terms of accessibility. I can also remove the light border above the sync-lock icon, but I think this looks best overall.
In Track::IsSyncLockSelected(), for the "// Not in a sync-locked group." conditional, it returned true if the track was selected. I made it do so only if track kind is Wave or Label. Among other things, this means Time and Note tracks will never show the sync-lock icon. I think this is correct by definition, but Al, please let me know if this will have negative repercussions elsewhere. There are *lots* of calls to that method and I can move the track-type check to the code that draws the sync-lock icon..
Fixed the bug Gale pointed out where, if a WaveTrack is shrunk such that the sync-lock icon is over a TrackInfo control, such as pan slider, it didn't intercept the mouse event, and passed it on to the control. Now, clicking on the sync-lock icon does nothing.
Fixed a bug where the sync-lock icon was redrawn dark when the minimize button is down. Now not redrawn at all in that case.
Added some clarifying comments, especially about the term "Label" as used in TrackPanel.*.
Fixed bug Martyn noticed, where clicking on the sync-lock icon caused the track to (un)minimize. This was because TrackInfo::GetMinimizeRect() was still returning the full size, which I had just adjusted in TrackInfo::DrawMinimize(), so the capture test in other places was wrong. Moved the size adjustment into TrackInfo::GetMinimizeRect().
Also got rid of unused bool minimized parameters of TrackInfo::GetMinimizeRect() and TrackInfo::DrawMinimize(). It wasn't used at all in TrackInfo::GetMinimizeRect(), so I replaced it with bIsSyncLockSelected, so it can determine whether to reduce the width to give room for the sync-lock icon. For TrackInfo::DrawMinimize(), it was unnecessary, because the track was also getting passed in, so no need to call t->GetMinimized() in every call to DrawMinimize() -- just call it within DrawMinimize().
final but it's a big improvement. Reversed a couple changes from
original indication scheme that are no longer necessary. Unfortunately
it's really hard to remove colors from AllThemeResources.h.