1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-17 08:30:06 +02:00

222 Commits

Author SHA1 Message Date
Paul Licameli
f5b0afc2fc Rename TrackPanel::HandleCursor as HandleMotion...
Call HitTest in just one place

Can now preserve repeatedly hit UIHandle objects during pre-click motion

Fields of HitTestResult besides the handle pointer are now unused

The need to repaint a track during mouse movement can be indicated when
constructing a UIHandle or when updating it for move; HitPreview no longer
does this

And the last allows simplifications of LabelTrack glyph highlighting

Also move the temporary state for label glyph dragging out of LabelTrack
2017-07-09 07:56:47 -04:00
Paul Licameli
efdb9889b1 TrackPanel no longer implements label keystrokes, drags, text selection...
... also implemented ESC key for those drags

... temporarily loses the special CTRL click handling
2017-06-15 08:54:58 -04:00
Paul Licameli
251976d93d TrackPanel no longer implements the time shift tool...
... also implement ESC key for it
2017-06-15 08:21:01 -04:00
James Crook
0caad3efe6 Bug 502 - Labels may disappear if partly before time zero 2017-05-15 11:07:44 +01:00
Paul Licameli
da28a45d67 User visible message when there are errors importing labels 2017-04-03 23:22:07 -04:00
Paul Licameli
e1473dfe76 void return, not boolean success, from some Track virtual functions...
... The return codes were mostly ignored anyway, and exceptions will be thrown
instead.

It seems there was also confusion whether the return values of Track::Paste
and Track::SyncLockAdjust were to indicate success or indicate whether there
was any change.  No matter now.
2017-03-31 18:26:52 -04:00
Paul Licameli
6b84dc1c1d Factory methods will return non-NULL or throw 2017-03-31 18:14:29 -04:00
Paul Licameli
b81cdee7e3 Comment where xml writing functions may throw 2017-03-18 11:45:05 -04:00
Paul Licameli
25619fb46e Don't create placeholder clips in Duplicate command ...
... when there is no clip at the right edge of the selection.
2017-03-17 17:52:39 -04:00
Paul Licameli
0be66296cd Sort labels after warping time, just in case...
... Time warping functions should be nondecreasing, but let's not assume so.
If not, the insertion sort just takes linear time to check that there are no
disorders.
2017-03-17 17:52:36 -04:00
Paul Licameli
81285ee0c1 More const and override 2017-03-17 17:52:20 -04:00
David Bailes
edb99485da Adjustment of fix for bug 1442
Issue was that an empty selection at time zero was included in the tab cycle.

This has been removed.
2016-10-27 10:21:58 +01:00
David Bailes
a79596fb4e Add a setting for whether labels can be created by typing
Added a setting for whether labels can be created by typing in a label track.
The setting can be changed in either the Tracks menu, or the Tracks category in Preferences.
By default the setting is set to on.
2016-10-26 13:11:07 +01:00
David Bailes
cf547077d5 Fix for bug# 1535: some text can be selected when tabbing to label
Problem was that mInitialCursorPos was not being set when tabbing to a label.
2016-10-25 11:43:08 +01: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
Paul Licameli
d783762737 Remove unnecessary std::move in return statements...
... and comment where it is necessary.
2016-09-15 07:39:46 -04:00
James Crook
b44ad7cd71 More unused parameters. 2016-09-11 20:52:04 +01:00
Paul Licameli
46f38708ed Dir manager uses std::shared_ptr 2016-08-13 12:23:05 -04:00
Paul Licameli
6e4e710d3b Remove seeming naked new and deletes in comments and uncompiled code 2016-08-10 11:05:51 -04:00
Paul Licameli
13e056de43 More uses of safenew 2016-08-08 10:07:37 -04:00
Paul Licameli
9b7e66b30f Bug1442 again: Fix TAB cycle through labels, special case...
... of a point label exactly at zero, with or without other labels.
2016-07-13 14:17:14 -04:00
Paul Licameli
f1799521aa Bug1349 again: Fix export and import of no-name labels 2016-07-12 22:16:15 -04:00
Paul Licameli
26676652d7 Bug1443 again: Mac label shift-click should differ, per David Bailes 2016-07-12 12:13:08 -04:00
Paul Licameli
cb3e5e6d4f Bug1443: Various odd behavior of label text editor, fixed...
... And label track selection code is simpler to understand, without delayed
side effects happening during drawing.

Left and right arrow keys collapse text range selection correctly
Shift-click adjusts the end of selection nearest the pick
Right (and middle) click and drag do not affect the selection
Copying empty selection has no effect on the clipboard
Left-drag behaves independently of previous selection state
2016-07-11 19:01:28 -04:00
Paul Licameli
3b7e61fc6e Export and import the frequency information in labels 2016-07-10 20:02:14 -04:00
Paul Licameli
ac2730170d Import and Export are methods of LabelStruct 2016-07-10 20:02:14 -04:00
Paul Licameli
519f4d6cf6 Simplify the label import routine 2016-07-10 20:02:14 -04:00
Paul Licameli
2543eacd94 Bug1442: fix cyclic TAB navigation among labels...
... with this small difference from 2.1.2 behavior:  when no label is
highlighted, the selection becomes empty.
2016-07-10 17:23:26 -04:00
Paul Licameli
c8d5905bd3 Clean up conflict markers in commented-out code 2016-07-10 15:37:32 -04:00
Paul Licameli
e39206b81b Clean up conflict markers in commented-out code 2016-07-10 15:36:59 -04:00
Steve Daulton
cad6dc8dd6 include <algorithm> to fix Linux build 2016-07-10 16:59:41 +01:00
Paul Licameli
0857118916 Put labels directly in a vector, not pointers to them...
... but this brings back some "mutable" members, not in LabelTrack, but in
LabelStruct.

To make that go away, and still have the Draw function const, figure out how to
update the label track layout at the right times, outside of the draw function.
2016-07-10 03:21:06 -04:00
Paul Licameli
590d492782 Simplify iterations over labels 2016-07-10 03:21:06 -04:00
Paul Licameli
6e772a3569 Use stl container idioms 2016-07-10 03:21:05 -04:00
Paul Licameli
7c07cb3b42 Avoid repeated subexpressions accessing labels 2016-07-10 03:21:05 -04:00
Paul Licameli
8fefea6d36 Rewrite LabelTrack::SortLabels 2016-07-10 03:21:05 -04:00
Paul Licameli
15bb2f0434 Lower a piece of text box dragging logic out of TrackPanel...
... This might cause more redrawing of label tracks for left click without
Shift, but who cares.
2016-07-10 03:21:05 -04:00
Paul Licameli
815d75b305 LabelTrack::HandleClick rearranged 2016-07-10 03:21:05 -04:00
Paul Licameli
7060dc4088 Simplify cut, copy, paste, delete routines of LabelTrack 2016-07-10 03:21:05 -04:00
Paul Licameli
d99c8abcf2 Various simplifications of LabelTrack code 2016-07-10 03:21:05 -04:00
Paul Licameli
7055a0f7c0 Remove two more unnecessary LabelTrack members; no more mutables! 2016-07-10 03:21:05 -04:00
Paul Licameli
06fd481815 Don't need to delay certain state changes of LabelTrack until drawing 2016-07-10 03:21:05 -04:00
Paul Licameli
7a7379c6fc Label text coordinate calculations don't need a window 2016-07-10 03:21:05 -04:00
Paul Licameli
f01fc64a2d More safenew, const functions, remove unnecessary members 2016-07-10 03:21:05 -04:00
Paul Licameli
53e30e5533 Label context menu can bring up the edit dialog 2016-06-26 13:34:52 -04:00
Paul Licameli
39063fba94 Guarantee default selection shows in Label Track's Font listbox...
On my Macintosh, with no audacity.cfg, selection is Lucida Grande when the
dialog opens.

Formerly, I saw no selection.
2016-06-23 13:45:22 -04:00
Paul Licameli
d787703fd9 foo 2016-06-23 12:40:37 -04:00
Paul Licameli
3015a9c8d9 Track cut and copy functions return a unique_ptr argument...
... Because they are factory functions.
2016-03-26 11:50:13 -04:00
Paul Licameli
5ef4dd46a5 TrackFactory functions return std::unique_ptr, although some callers...
... release() them for now.
2016-03-26 11:50:12 -04:00
Paul Licameli
f42a953752 Track duplication methods return unique_ptr, although some callers...
... simply release() them for now.
2016-03-26 11:50:10 -04:00