Commit Graph

375 Commits

Author SHA1 Message Date
Paul Licameli 81285ee0c1 More const and override 2017-03-17 17:52:20 -04:00
Darrell Walisser 43291687a5 Bug 1401 - Wait for window visibility before starting timer 2017-02-25 16:16:42 -05:00
David Bailes ff9763f984 Add two commands to move the cursor/selection to next/prev label
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".
2016-10-24 14:24:20 +01:00
James Crook fe2dfca3e0 Bug 1522 - No pointer or Status Bar indication of CTRL-click in waveform to move selection boundary
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.
2016-10-07 21:38:18 +01:00
James Crook 37a0cd3af6 Bug 1484 - Cannot one-step extend/contract selections vertically or horizontally to specific TrackSelFunc
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.
2016-10-03 13:28:25 +01:00
Paul Licameli 88611a4530 Fewer C-style pointer casts of tracks; comments justify static_cast 2016-09-15 12:12:43 -04:00
James Crook 0f417a65c7 RaphaelMarinier - Initialise mFreqSelTrack (found by Valgrind) 2016-09-11 22:00:01 +01:00
James Crook c57f829200 Bug 1484 - (Residual) Shift-Click calculates start/end for itself.
Smarter logic, which extends down from the first or up from the last.
2016-08-30 23:46:12 +01:00
Paul Licameli 5761972dfa BHug1488: Don't crash exiting from command-line benchmark test...
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.
2016-08-20 13:58:56 -04:00
Paul Licameli 13e056de43 More uses of safenew 2016-08-08 10:07:37 -04:00
Paul Licameli 60260520dc Remove some naked new amd delete in: TrackPanel 2016-08-08 07:38:30 -04:00
Paul Licameli 3b6dcfcc32 Remove some naked new amd delete in: TrackPanel::mAx 2016-08-08 07:38:30 -04:00
Paul Licameli cc5d1036fa Pinch and spread gestures on Mac touchpad, if EVT_MAGNIFY is defined 2016-07-03 12:14:08 -04:00
Paul Licameli 28c31903e9 Update mixer board selection state correctly for undo/redo 2016-06-26 13:31:00 -04:00
Paul Licameli 4823244050 Bug1426: Better selection for key-modified clicks in TCP, Mixer board 2016-06-26 12:03:45 -04:00
Paul Licameli ee7b3b2b89 Bug1426: Update mixer board for change of set of selected tracks 2016-06-26 11:24:11 -04:00
Paul Licameli 21431d1982 No longer need silly extra indirection to void a VS compiler warning 2016-06-26 10:45:57 -04:00
Paul Licameli dd786984db Bug320: Better change of selection when Shift+Click in a track...
... But Shift+Click in the track control panel is still different:  se bug 1425
2016-06-26 10:39:29 -04:00
Paul Licameli 1409c9507d Fix crashes when opening track control panel menu 2016-06-13 10:06:20 -04:00
Paul Licameli bb7dba2b67 Shortcut keys can appear as intended in Track Control Panel menus...
... Delayed construction of the menus was needed.

So far this only affects the four menu items that move tracks up and down.
2016-06-12 00:00:04 -04:00
Paul Licameli 4f2ee32a1a One second countdown now based on the correct timer interval 2016-05-27 11:40:17 -04:00
Steve Daulton 0377a24f90 Comment out unused TrackPanel::BuildVRulerMenuItems function
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.
2016-05-27 10:45:01 +01:00
Paul Licameli ba883cbcf4 Improve responsiveness of drag seek during click-scrub...
.. by refreshing the TrackPanel window less often.
2016-05-23 18:37:42 -04:00
Paul Licameli 7e0de9a9bc Fix incidentals to Bug 1331, though not the bug itself...
... 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.
2016-05-21 23:19:09 -04:00
Paul Licameli 7c2a531486 New base classes of TrackPanel just for the bitmap backing and overlay system...
... to make it reusable by other classes.

Also, don't create a second DC when repainting TrackPanel.
2016-05-09 11:37:32 -04:00
Paul Licameli e7477746df Computing best font size for TrackInfo is redone when preferences change 2016-05-01 17:55:48 -04:00
Paul Licameli 5a5775c1c1 Implement showing and hiding of a srub bar portion of the ruler...
... 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.
2016-04-27 18:39:47 -04:00
Paul Licameli 81fae8d71c Rework the ESC key to stop playback as an application event handler...
... 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.
2016-04-20 15:34:49 -04:00
Paul Licameli ce95bce85a Bug991: Pause button and command should be disabled during scrubbing...
... and they will be as soon as ctrl-mouse down.
2016-04-18 21:49:27 -04:00
Paul Licameli 9f65b80647 Reimplement quick play indicator as an overlay like the cursor 2016-04-18 14:31:36 -04:00
Paul Licameli 8b7ae748a3 Scrub speed as overlay; scrub event handling details out of TrackPanel.cpp 2016-04-18 14:31:36 -04:00
Paul Licameli 1722ee9e32 Define TrackPanelOverlay, use it to reimplement play indicator and cursor...
... but scrub speed display is disabled
2016-04-18 14:31:36 -04:00
Paul Licameli def8b7fa9b MakeCursor returns smart pointer; TrackPanel stores smart pointers to cursors 2016-04-09 23:07:27 -04:00
Paul Licameli b28ec2957a Make EXPERIMENTAL_MIDI_OUT compilable, but it doesn't link 2016-04-09 15:10:05 -04:00
Paul Licameli 0c9deb398c Fix mac build. No standard headers in Audacity.h. 2016-03-01 12:22:37 -05:00
Paul Licameli 990080ae7d Replace virtual with override wherever possible; eliminate needless virtual...
... 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.
2016-02-26 12:35:38 -05:00
Paul Licameli 7824e94030 Harmlessly qualify classes as final (or explicitly comment not)...
... 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.
2016-02-24 20:58:30 -05:00
Paul Licameli e2f7e5f6f6 travis 2016-02-24 20:45:49 -05:00
Paul Licameli cd9bd79d83 Use an enumeration for UndoManager::PushState 2016-02-24 19:10:35 -05:00
Paul Licameli 73ced7b93f Remove UndoManager.h from other headers 2016-02-24 19:10:34 -05:00
Paul Licameli 9bf098c7d9 Sweep unnecessary wxString copies: rest 2016-02-23 02:15:56 -05:00
Paul Licameli df6a7c5464 More uses of safenew for classes we derive from wxWindow classes...
... Also removed some unnecessary deletes of widgets that are managed by parent
windows
2016-02-14 20:39:28 -05:00
Paul Licameli 7c4c45a0d5 "new"->"NEW" in comments, easier to find remaining naked operator new 2016-02-14 18:52:41 -05:00
Paul Licameli daa7617e88 auto_ptr (deprecated) -> unique_ptr (preferred in C++11) 2016-02-13 12:00:28 -05:00
Paul Licameli d70ff3337d Bug501: Improve time-shift of clips between tracks...
... 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.
2016-01-24 23:08:10 -05:00
David Bailes ba3b1b14ae possible fix for bug 1250
Go back to having both mono and stereo items in track menu.
2015-10-26 10:17:07 +00:00
Leland Lucius 2d88ad63e0 Fix for bug #1191 2015-09-08 11:24:59 -05:00
Paul Licameli f24742acc0 Be sure to refresh scrub speed display when wheel moves but pointer does not 2015-09-04 20:52:26 -04:00
Paul Licameli 05de64e251 Remove unused fns; fix missing & misspelled headers in make & project files 2015-08-30 13:19:08 -04:00
Paul Licameli 01fe404a02 Move track permuting details out of TrackPanel.cpp 2015-08-29 13:46:35 -04:00
Paul Licameli f49dbae9e2 Move minimize and close details out of TrackPanel.cpp 2015-08-29 13:46:26 -04:00
Paul Licameli 45e91f165a Move gain and pan details out of TrackPanel.cpp 2015-08-29 13:46:16 -04:00
Paul Licameli 6bfd3ee54a Move Mute and solo details out of TrackPanel.cpp 2015-08-29 13:45:51 -04:00
Paul Licameli e7482c74bd Move cursor moving functions out of TrackPanel 2015-08-27 21:22:41 -04:00
Paul Licameli 5697f77a06 pull out a function for vertical ruler wheel events 2015-08-27 12:55:24 -04:00
Paul Licameli 6c6fc360ca Put the scroll-beyond-zero flag in just one place, ViewInfo 2015-08-26 23:17:20 -04:00
Paul Licameli c45ea059e6 Reorder some things that happen in the track panel timer update. 2015-08-26 17:57:02 -04:00
Leland Lucius f6cbc5e6db Merged a couple of patches from Debian, one of which should fix bug #1147 2015-08-25 23:08:12 -05:00
Leland Lucius 6a9dae20f5 Appearance on OSX is now back to normal or better
Some additional wx3 cleanup as well.
2015-08-23 20:25:01 -05:00
Paul Licameli 1b8f44d053 ViewInfo does not redundantly (or inconsistently!) store the screen width 2015-08-21 22:39:18 -04:00
Paul Licameli a9ab31dedb Allow NULL arguments in TrackPanel::GetTracksUsableArea() 2015-08-21 12:02:48 -04:00
Paul Licameli e7c7bb84a9 Fix off-by-one width in TrackPanel::GetTracksUsableArea() 2015-08-21 11:49:49 -04:00
Paul Licameli 112d2a903b Rename View Settings... to Spectrogram Settings... and enable it only for...
... spectrogram views, and don't show the Waveforms page.
2015-08-19 10:21:04 -04:00
Paul Licameli 409cbb2996 Bugs 994, 1030: Scrubbing behavior with pointer outside of the track panel...
... 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.
2015-08-18 11:06:53 -04:00
Paul Licameli cf45a58fdc dB range is now in Waveforms preferences and view settings, and ...
... the preference is independent of those in Interface and Recording
preferences, which affect meters, sound activated recordings, time track,
and Plot Spectrum
2015-08-15 18:07:29 -04:00
Paul Licameli 5d2e877529 Scroll wheel with pointer in vertical ruler zooms in or out for wave track...
... regardless of the modifier keys; and does nothing in other tracks.
2015-08-14 20:34:06 -04:00
Paul Licameli 4cc064df8e Draw scrub speed like cursor or indicator: without a full refresh. 2015-08-13 19:49:09 -04:00
Paul Licameli 9ba6e03bd4 Reorganize code for drawing cursor and indicator, so it can generalize to...
... other things (like scrub speed)
2015-08-13 19:43:20 -04:00
Paul Licameli 5580aececc Untangle the control flow of mouse event handling in label tracks 2015-08-10 20:02:24 -04:00
Leland Lucius 300f0f05a0 Move TrackPanel keyboard handling out of AudacityProject...
...and into TrackPanel where it should be.
2015-08-09 18:26:29 -05:00
Paul Licameli 9a53625ceb Bug1134: Click and drag to move a track should make only one undo item 2015-08-08 18:55:31 -04:00
Paul Licameli b0de2fa900 Show only the channel-related menu items appropriate to mono or stereo, and...
... Changed accelerators to avoid conflict:
for mono tracks, R&ight
for stereo tracks, Split Stereo to &Mono
2015-08-04 13:00:46 -04:00
Paul Licameli eeaaadb530 Merge branch 'master'
* 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
2015-08-04 12:26:22 -04:00
Paul Licameli db896e6511 Revert "Show only the appropriate channel-related track menu items for mono or stereo."
This reverts commit 7b737a99c7.
2015-08-04 12:23:50 -04:00
Paul Licameli 971fd38615 Rename some variables 2015-08-03 13:50:49 -04:00
Paul Licameli 7b737a99c7 Show only the appropriate channel-related track menu items for mono or stereo. 2015-08-02 14:29:56 -04:00
Paul Licameli d6b76e3589 Revert "Make a Channels sub-menu, and change accelerators to be more mnemonic..."
This reverts commit cc08bba27a.

Conflicts:
	src/TrackPanel.cpp
2015-08-02 13:27:22 -04:00
Paul Licameli cc08bba27a Make a Channels sub-menu, and change accelerators to be more mnemonic...
... 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.
2015-08-01 13:38:12 -04:00
Leland Lucius 7877615454 Move label context menu handling to label track
Application key now brings up the context menu while editing labels
as it should.  This wasn't possible with the old keyboard handling.
2015-07-30 10:38:03 -05:00
Paul Licameli fdf0759301 Bug1075, and define and use new event type for TrackPanel timer ticks...
... Thus allowing TrackPanel.cpp to work without including Lyrics headers.
Also eliminates some of its direct notification of MixerBoard.
2015-07-28 11:56:00 -04:00
Paul Licameli 4f0a2ee804 Bugs 1059, 1077: don't edit cut lines during play; show correct cursor...
... Don't show the arrow when in fact the click at the bottom of the track
will resize.
2015-07-28 11:55:59 -04:00
Paul Licameli 912cdb6c53 (most of) Bug 1077: Resizing cursor correctly appears, except...
... we still see an incorrect arrow cursor where the cutline meets the bottom
of the track.
2015-07-28 11:55:57 -04:00
Paul Licameli 7bba4500c4 Move mdBr from TrackPanel to ViewInfo, no more lookup of prefs in Envelope.cpp 2015-07-28 11:53:01 -04:00
Paul Licameli edba89d704 Pass tooltips by wxString, not const wxChar* 2015-07-28 11:49:56 -04:00
Paul Licameli 4a4918a3f8 More uses if IsUnsafe() or IsAudioActive() 2015-07-28 11:49:53 -04:00
Paul Licameli d8ce9f0d7d Move an array definition to Snap.h, use std::vector 2015-07-28 11:49:51 -04:00
Paul Licameli 87965cf164 Bug1076: Don't obliterate the point selection display during playback 2015-07-28 11:49:48 -04:00
Paul Licameli f81231efae Remove Sequence.h from other headers 2015-07-28 10:02:08 -04:00
Paul Licameli eaaab766db Remove WaveClip.h from other headers 2015-07-28 10:02:06 -04:00
Paul Licameli d39eaa4e65 Remove WaveTrack.h from other headers 2015-07-28 10:02:05 -04:00
Paul Licameli 11f794d3fb Menu items for zooming in vertical ruler popup for wave tracks...
May be good for discoverability of the click actions.
2015-07-28 09:37:00 -04:00
Paul Licameli 197700967f pop-up menus for vertical ruler 2015-07-28 09:36:58 -04:00
Paul Licameli 43b7df701b Use class NumberScale in TrackArtist and spectral selection, abstracting...
... the details of mapping to and from pixel height
2015-07-27 23:01:11 -04:00
Paul Licameli 1f6f43bba7 Track control "View Settings..." makes alternative SpectrumPrefs accessible 2015-07-26 21:33:14 -04:00
Paul Licameli 1dffeace93 Access SpectrogramSettings via WaveTrack, which may be nondefault (no UI yet)...
... and add accessors to SpectrogramSettings, and remove TrackArtist functions
for getting and setting the globals.
2015-07-26 21:10:16 -04:00
Paul-Licameli 5418ce377b Move PositionToTime, TimeToPosition into class ZoomInfo ...
... and use them in many more places in TrackPanel.cpp, so there are fewer
direct uses of ZoomInfo::zoom.

Also use then in horizontal scrolling code
2015-07-19 11:44:04 -04:00
Paul-Licameli ab21f75c77 ViewInfo is becoming a smart class, not a dumb struct
Now it has:
A constructor
XML attribute serializer functions (but no XML tag of its own)

Also removed unused lastZoom
2015-07-19 11:43:59 -04:00
Paul Licameli 0bed89419f More for bug 1014: stop scrubbing when switching out of select tool...
... 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.
2015-06-08 09:56:17 -04:00
Paul Licameli f332df1f36 Pulled repeated code into a function; share some calcs with Envelope editor 2015-06-03 02:37:42 -04:00
Paul Licameli 85a533be79 Remove unused variables; fewer casts 2015-06-03 02:37:41 -04:00
Paul Licameli 4f5483b4af Scroll-seek improvements 2015-05-30 14:28:33 -04:00
Paul Licameli 6ae8a656ab Rewrote escape key handling, more like other Track Panel key handlers
... and removed some abandoned spectral editing code
2015-05-29 21:13:59 -04:00
Leland Lucius 0ef7ccb1d1 Fix permissions...not sure why this was happening though 2015-05-29 19:49:28 -05:00
Paul Licameli 8d2a29d376 Bug989, and scrub UI uses left button to seek, not Shift key
Updated mouse preferences and status bar message accordingly

Also, use the term "Scroll-scrub" in status bar and mouse preferences
2015-05-29 20:29:44 -04:00
Paul Licameli 9f2dfbc70b Revert "Bug990 (seek key reponsiveness), and, change Scrub UI again, so Ctrl key seeks."
This reverts commit 841bca36ea.
2015-05-29 19:45:43 -04:00
Paul Licameli 841bca36ea Bug990 (seek key reponsiveness), and, change Scrub UI again, so Ctrl key seeks.
Includes changes to Mouse Preferences and status bar messages.
2015-05-29 17:30:19 -04:00
Paul Licameli 6810095509 Removed some functions never called, code never reached, fields never used 2015-05-29 00:13:50 -04:00
Paul Licameli e60057fd85 Bug924, addendum: pause scrubbing when Audacity loses focus...
... 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.
2015-05-27 20:14:32 -04:00
Paul Licameli f07a487e47 Bug977: Enable new scrolling limits as a Tracks preference, default off. 2015-05-27 18:47:03 -04:00
Leland Lucius 8f77334286 Fix for bug #949
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.
2015-05-24 22:54:10 -05:00
Paul Licameli 35ac843baf Scrub with ctrl-left clicks, not middle drags; also fix bug 937
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.
2015-05-19 12:03:04 -05:00
David Bailes 593197c2db add commands for moving focused track up, down, to top, and to bottom 2015-04-24 16:19:28 +01:00
Leland Lucius ed79e13fbf Merge pull request #36 from DanWin/performance
Performance improvements
2015-04-24 07:52:38 -05:00
David Bailes 0b2d5729c5 added two commands to move to first or last track 2015-04-24 11:38:55 +01:00
James Crook 593cc6ee5e Bug 855 - Data loss sample editing (Do/Undo)
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.
2015-04-24 09:55:03 +01:00
Daniel Winzen 92d522132e Variable cleanup 2015-04-23 18:30:38 +02:00
Daniel Winzen 759ff8cd0d Performance improvements 2015-04-23 16:07:25 +02:00
Steve Daulton e45afbaa76 A few minor fixes to Quick-Play (now hyphenated for consistency). 2015-04-21 20:46:52 +01:00
Paul-Licameli 10e35bb6bb Add user interface for scrubbing and Experimental.h switches
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.
2015-04-17 14:09:35 -04:00
Steve Daulton 702d9d75e5 Timeline Quick Play bug fixes and enhancements 2015-04-17 17:52:13 +01:00
Paul-Licameli 21fd4ab374 Remove the unsuccessful scrubbing experiment of 2.0.6. 2015-04-17 02:25:26 -04:00
Paul-Licameli 69729c2960 ESC key aborts selection drag, restores time, frequency selection, selected tracks 2015-04-12 12:39:11 -04:00
Paul-Licameli db1cb406e0 ESC key aborts resizing of mono track, stereo track, or channels of stereo track
Resizing may un-minimize a track; I was careful to be sure ESC restores
minimized state too and then that un-minimizing restores correct height
2015-04-11 23:53:34 -04:00
Paul-Licameli 903fcb1fc2 ESC key can abort certain dragging actions
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.
2015-04-09 15:50:04 -04:00
Leland Lucius 2457579091 Bug 765 - Delays using Edit commands and Draw Tool in long projects
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.
2015-04-07 12:20:50 +01:00
lllucius 2c6401b564 Committing Paul's spectral nagivation commands patch
From:

http://audacity.238276.n2.nabble.com/Patch-spectral-peak-snapping-navigation-commands-td7565648.html
2014-12-22 08:03:41 +00:00
james.k.crook@gmail.com c71397beae Changes to seeking and scrubbing from Paul Licameli.
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.
2014-11-29 22:09:57 +00:00
james.k.crook@gmail.com 30500b2e85 Fix for http://bugzilla.audacityteam.org/show_bug.cgi?id=792 "Right end of selection cannot be adjusted with a mouse when left end is behind zero" by Paul Licameli. 2014-11-29 17:10:56 +00:00
james.k.crook@gmail.com 2131568876 Spectral Selection Toggle (using q key) by Paul Licameli. 2014-11-29 16:53:28 +00:00
martynshaw99 bc6583b62d Paul L's patch to remove the 'PlaybackCursor' that he introduced, along with a ststus bar message about it. Also fixes L/R cursors with a point selection. 2014-11-25 23:37:40 +00:00
james.k.crook@gmail.com 1933070f0d Tweak to spectral selection behavior when one edge is tied.
Idea by Martin.  Implemtation by Paul Licameli.
2014-11-11 15:24:22 +00:00
james.k.crook@gmail.com 67d2b274e2 Frequency Selection toolbar from Paul Licameli.
Linux/Mac will need new files adding to project, SpectralSelectionBar.cpp, NumericTextCtrl.cpp.
2014-11-08 15:18:43 +00:00
james.k.crook@gmail.com 6112a2a8c1 Spectral selection cursor and mode selection changes from Paul Licameli.
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.
2014-11-08 14:30:19 +00:00
james.k.crook@gmail.com 31fa2be749 Clean up of some spectral selection code making it shorter, clearer and easier to check.
Also added non-shift behaviour for shift and drag center line, that previously asserted.
2014-10-26 10:11:35 +00:00
james.k.crook@gmail.com 290a0107c9 Patch from Paul Licameli Improving Spectral Selection
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.
2014-10-25 22:05:45 +00:00
james.k.crook@gmail.com bffa710ce4 Removed TrackPanel:: prefix so can compile under Linux. 2014-10-18 18:36:34 +00:00
james.k.crook@gmail.com a6f9f6bc58 Spectral Editing: Using subroutines to shorten code, and more comments in the code. 2014-10-18 16:01:50 +00:00
james.k.crook@gmail.com 37608c2290 Paul Licameli's Spectral Editing Patch.
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.
2014-10-18 14:19:38 +00:00
james.k.crook@gmail.com f5e593cc4c Paul L's new SelectedRegion class replacing use of t0 and t1. Also LabelTrack.h no longer in TrackPanel.h includes.
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.
2014-10-05 17:10:09 +00:00
lllucius 96324b5520 Add "Delete Label" to right click when editing labels. 2014-07-12 14:26:07 +00:00
benjamin.drung@gmail.com 277932dccb Remove trailing spaces. 2014-06-03 20:30:19 +00:00
martynshaw99 65e4f56126 Norm's patch to improve selection speed on large projects by reducing the number of unnecessary auto-saves. Maybe vertical zooming should also not trigger an auto-save? 2013-12-30 00:41:18 +00:00
v.audacity a68955a0dd Steve's patch for http://bugzilla.audacityteam.org/show_bug.cgi?id=675, "Additional Track Drop-down Menu commands" 2013-11-03 01:17:58 +00:00
RichardAsh1981@gmail.com be4f39c9c7 refactor the construction of the track pop-down menu into a function to avoid repeating the code multiple times to do the same thing. This makes extending the track pop-down menu, and eventually breaking this class up, much easier 2013-10-30 22:07:06 +00:00
lllucius 71fde85bfe 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.
2013-10-23 21:01:52 +00:00
lllucius 03f5088b6a Bug 406 - Label creation/other non-dialogue editing and keyboard selection hang on long projects
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
2013-10-23 18:01:14 +00:00
v.audacity 7a4a3e3951 Handle Alt key down events, specifically for draw tool. 2013-08-09 01:03:34 +00:00
martynshaw99 f209391d59 John (Thales) code to make the waveform display look like the output of the gain and pan sliders, rather than the input. Added as EXPERIMENTAL_OUTPUT_DISPLAY since there is work to do, but I think this deserves wider input/views. 2013-05-30 23:14:25 +00:00
v.audacity 9d0daf8662 Campbell Barton's patch to turn many, many tabs to our 3-space convenbtion 2013-02-20 23:42:58 +00:00
richardash1981 55be06c9e4 commit a large patch by Maarten Baert maarten-baert<at>hotmail<dot>com to fix and improve time track support. Several fix-me issues remain but none are new with this patch. 2012-12-19 21:49:25 +00:00
richardash1981 c32cfbc2a5 commit fix for crash if you undo whilst time-shifting a track, found and produced by Campbell Barton 2012-12-04 16:41:43 +00:00
v.audacity da08f1ea12 Fix bug 181. 2012-08-16 23:41:09 +00:00
v.audacity 0d08f11504 Fix bug 187. 2012-02-14 00:18:29 +00:00
james.k.crook@gmail.com ed66bf3fab Changes to allow mod-track-panel. 2011-11-25 20:40:26 +00:00
v.audacity 1ceb0ef660 Apply modified version Roger Dannenberg's patch to remedy some problems from commit r10680 and fix some bugs. 2011-10-19 23:06:53 +00:00
mchinen 9bd2da0284 Bug 406 (P2) - (partial?) Fix for labeltracks in large projects being slow/laggy/jerky.
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.
2011-06-04 02:41:16 +00:00
james.k.crook@gmail.com 3f68c0b92e Release build needed UndoManager.h included. 2011-05-22 16:23:11 +00:00
james.k.crook@gmail.com 74490b02c7 Bug:406 Amelioration of slowdown when editing labels with long audio. 2011-05-22 13:41:01 +00:00
v.audacity 0a15abc8aa Fix accidental migration from branch. 2011-04-26 21:24:28 +00:00
v.audacity de184c3b86 clarifications and corrections in some comments 2011-04-26 21:19:59 +00:00
mchinen 015ac3f873 Bug 373 (P2) - Improve vertical dragging. Fixed an issue where stereo tracks would split up under certain conditions. Other conditions still cause this bug. Also fixed an issue where strange behavior could occur if the right channel of the stereo pair was selected for dragging. 2011-04-26 13:15:19 +00:00
BusinessmanProgrammerSteve 83ac7266c8 Reduce initial slider pool size to cut project-open time. 2010-11-05 06:25:26 +00:00
rbdannenberg a1f0e5ed5b Extensive changes to improve NoteTrack display and (some) editing, NoteTrack playback via MIDI, and Midi-to-Audio alignment. 2010-09-18 21:02:36 +00:00
v.audacity c43b3bc387 (sync-lock)
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.
2010-09-16 23:08:33 +00:00
v.audacity 1663db9915 (sync-lock)
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.
2010-09-12 05:11:43 +00:00
v.audacity 702894c67d (Sync-Lock)
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.*.
2010-09-09 00:46:40 +00:00
v.audacity 536af8ad52 (Sync-Lock)
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().
2010-08-25 22:34:17 +00:00
v.audacity e30ce7ddb7 Remove EXPERIMENTAL_LYRICS_WINDOW and EXPERIMENTAL_MIXER_BOARD. They've been in every beta for almost a year, so they're no longer experimental. 2010-07-21 04:53:38 +00:00
BusinessmanProgrammerSteve db39f6262b Keep a constant set of gain/pan sliders -- this allows Audacity
to open projects with very large numbers of tracks without
crashes (Windows) or major slowdows.
2010-04-21 05:03:24 +00:00
BusinessmanProgrammerSteve b9fce94477 Implements darkchains_mod2a style linking indication. This may not be
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.
2010-03-09 04:59:26 +00:00
BusinessmanProgrammerSteve e73414d4d1 Improve timeshift tool behavior with linking 2010-03-06 18:39:31 +00:00
businessmanprogrammersteve b646b10df2 Adds Track::IsSynchroSelected() and visuals for synchro (group) selection 2010-02-12 16:05:02 +00:00
BusinessmanProgrammerSteve dbc4aab314 Fix lots of snapping problems by moving snap-to-time into SnapManager.
Do a 'make dep' after updating, some #includes are added.
2010-02-02 19:43:52 +00:00
BusinessmanProgrammerSteve b51db1586b Support mice with high-precision scroll wheels
fixes P2: Ctrl+Mouse Wheel causes Crash (hang)
2010-01-25 22:44:48 +00:00
ra e74978ba77 Locate and position the current Audacity source code, and clear a variety of old junk out of the way into junk-branches 2010-01-23 19:44:49 +00:00