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

45 Commits

Author SHA1 Message Date
Paul Licameli
4abd38b9a0 Bug2464 extra: labels should be draggable from one track to another 2020-09-21 17:31:48 +01:00
Paul Licameli
9b1901c971 A convenience function in LabelTrackShifter eliminates repetition 2020-09-21 17:31:48 +01:00
Paul Licameli
c48b813795 Bug2464: Shifting a label should shift wave clips too...
... Implemented non-invasively just with overrides in LabelTrackShifter

Exceeding the bug description: it's also possible to drag just the subset of
labels that fall partly or wholly in the selected region.

I expect details of the new behavior may be debated.
2020-09-20 01:01:17 -04:00
Paul Licameli
4ca3e7096f
Track factory cleanup (#646)
* Don't need TrackFactory to make LabelTrack

* Don't need TrackFactory to make NoteTrack

* Don't need TrackFactory to make TimeTrack, or ZoomInfo in the factory

* Remove some forward declarations

* Rename TrackFactory as WaveTrackFactory, move it out of Track.cpp
2020-08-22 18:44:49 -05:00
David Bailes
975ee0cc07 Bug 2496 - Label edit typing prepends selected text
Problem:
labelStruct, a copy of the label is initialized before call to RemoveSelectedText() which acts on the real label. So when the label is updated using labelStruct, the selected text has not been removed.

Fix:
Initialize labelStruct after the call to RemoveSelectedText().
2020-07-10 10:37:02 +01:00
James Crook
d4c91c7a65 Bug 2388 - Point label and range label can appear identical 2020-04-11 17:36:50 +01:00
Yuri Chornoivan
d1ada5f08c Fix minor typos 2020-04-11 10:06:24 +01:00
James Crook
b16251f0ed Bug 2380 - Enh: Point label micro-range issue 2020-04-04 23:10:07 +01:00
James Crook
a41e16cb1f Update wording per https://wiki.audacityteam.org/wiki/Wording
Also wording on Mac, Command+Click
2020-04-04 16:03:04 +01:00
James Crook
1176b61953 Wording changes, per wiki:
https://wiki.audacityteam.org/wiki/Wording
2020-01-10 17:02:31 +00:00
Paul Licameli
d244b55709 Don't use GetActiveProject when drawing label track 2020-01-06 14:14:21 -05:00
Paul Licameli
f0b75832b4 Remove uses of GetActiveProject in some dialogs 2020-01-04 13:55:34 -05:00
Paul Licameli
92b857d551 Remove unnecessary const_cast 2020-01-04 11:59:44 -05:00
Paul Licameli
89a3771730 TranslatableString for AudacityTextEntryDialog message and caption 2019-12-21 11:23:32 -05:00
Paul Licameli
4eb220e7b9 TranslatableString for undo history short and long descriptions 2019-12-16 14:19:23 -05:00
James Crook
23f05c618c Fix signed/unsigned comparison warnings. 2019-12-06 11:33:22 +00:00
David Bailes
664452b1a8 Bug 2183 - Characters in labels cannot be deleted
Fix: update the actual label (labelStruct is a copy).
2019-08-03 09:13:53 +01:00
Paul Licameli
05997dc267 Bug2180: complete the fix...
... Don't forget the unbinding of the event handler

See previous commit, e589ed8ecfdc99bdb00e0d011b2fc40318cb43ed
2019-08-01 06:33:52 -04:00
Paul Licameli
e589ed8ecf Bug2180: Type-to-create labels twice should work...
Bug began at 0750f62e88ee96cd4804c19ba54e3ac1d2ff1b73

Track::SetSelected is virtual, after all, but then LabelTrack informs
LabelTrackView of selection changes by events, so that LabelTrack remains
independent of LabelTrackView.

This might make much of the rest of the guily commit unnecessary (the resetting
of selected index to -1 only lazily), but it is harmless.
2019-07-31 16:40:16 -04:00
Paul Licameli
93bb862aa2 Remove unnecessary #include 2019-07-18 15:05:37 -04:00
Paul Licameli
33f3d4b82d Heavyweight version of SelectedRegion stored in ViewInfo emits events 2019-07-17 12:43:39 -04:00
Paul Licameli
2bec03ac08 TrackView subclasses do not depend on corresponding TrackControls...
... use an AttachedVirtualFunction to compute the default view height from
the controls.

This frees LabelTrackControls from cycles.

Also made Track::DoSetHeight non-virtual
2019-07-09 00:05:01 -04:00
Paul Licameli
9ca295c9f7 Remove some unnecessary #include-s 2019-07-08 23:53:41 -04:00
Paul Licameli
acfd2b7010 TrackFocus is a new attached object...
... removing the need to use TrackPanel to get and set the focused track

ProjectAudioManager loses its direct dependency on TrackPanel
2019-07-03 19:10:21 -04:00
Paul Licameli
52ff705b0d ScrollIntoView out of TrackPanel, into ProjectWindow 2019-07-03 13:32:32 -04:00
Paul Licameli
a5364119eb Eliminate many calls to RedrawProject & TrackPanel::Refresh()...
... Let the window respond to an undo manager event instead, whenever there
is a push or modify

Maybe this makes a few unnecessary redraws that did not happen before.  If
that is important, then we should figure out how to put the logic for eliding
the redraw into ProjectWindow, and the extra information needed for the
decision into the events, but not make intrusions in other code all over the
place.
2019-07-02 08:17:01 -04:00
Paul Licameli
37f75d8049 Bug2141: Tabbing should work in focused label track, selected or not 2019-06-28 18:12:48 -04:00
Paul Licameli
f77ddc43d9 Smuggle AudacityProject into LabelTrackView::GetSelectedIndex() ...
... and eliminate some more calls to GetActiveProject
2019-06-28 18:09:29 -04:00
Paul Licameli
30715e4fe2 Pass AudacityProject as context into TrackPanelCell key handlers...
... as was done for mouse events.

This eliminates some need for GetActiveProject(), which is good, and prepares
for the fix for bug 2141
2019-06-28 13:18:07 -04:00
Paul Licameli
b05acc32da Move drawing code for track names 2019-06-27 00:10:53 -04:00
Paul Licameli
b881a6e918 Move drawing code for tracks, free EnvelopeEditor from cycles 2019-06-26 23:39:42 -04:00
Paul Licameli
f87dfd43c1 GetVRulerWidth, GetLabelWidth, GetLeftOffset out of TrackPanel.h...
... And some things demoted from ViewInfo to ZoomInfo, related to x coordinates
only
2019-06-26 21:25:15 -04:00
Paul Licameli
dc9e436dde Change the track view copy function...
... It is const, renamed CopyTo, and invokes the create-on-demand factory in
the destination track; this means Track.cpp doesn't need to do that, and so
does not need TrackView.h
2019-06-22 21:46:33 -04:00
Paul Licameli
8793d6b475 Demote Copy to CommonTrackCell; Track points only to that base class 2019-06-22 21:46:33 -04:00
Paul Licameli
3e0d48cc14 Redefine the factories for track views and controls...
... non-intrusively in the Track suclasses, registering functions instead.

For each abstract factory function (of two), build a table of concrete factory
functions, paralleling the hierarchy of Track subclesses.  Dispatch using
runt time type information in the Track objects.
2019-06-21 09:16:49 -04:00
David Bailes
660b8c07ad Fix Windows build - fix include paths 2019-06-21 09:29:32 +01:00
Paul Licameli
f75bf45478 Fix #include directives 2019-06-21 00:23:40 -04:00
Paul Licameli
f2869597b6 Move code from LabelTrack into LabelTrackView...
... and remove many #include directives from LabelTrack
2019-06-20 11:47:55 -04:00
Paul Licameli
e3efd52026 Move many declarations into LabelTrackView & define its Copy() 2019-06-20 10:47:25 -04:00
Paul Licameli
66e32ca35d Move Y position, height, and minimized state into TrackView...
... and eliminate some unnecessary calls to SubstitutePendingChangedTrack,
because the track and the substitute store Y and height in their shared
TrackView object.

Also make GetMinimizedHeight() virtual to avoid inclusion of TrackPanel.h in
TrackView.cpp.
2019-06-18 16:01:06 -04:00
Paul Licameli
e581fa60d9 Move responsibilities from Track to TrackView classes...
... And Track no longer inherits TrackPanelCell, so be careful to rewrite
some dynamic_casts too to check instead for TrackView.  Those casts won't fail
to recompile if not rewritten.
2019-06-18 16:01:06 -04:00
Paul Licameli
9d26eb7a41 Define LabelTrackView::Get(), LabelTrackView::FindLabelTrack() 2019-06-18 16:01:06 -04:00
Paul Licameli
18b4c01c51 TrackVRulerControl is directly owned by TrackView not Track...
... in anticipation of making views to tracks many-to-one, but then the rulers
should be one-to-one with the views.  So go through the view to get the ruler.
The ruler is really a left-hand extension for each view.
2019-06-18 16:01:06 -04:00
Paul Licameli
059d7eaa42 Associate View object with Track, analogous with controls 2019-06-18 16:01:06 -04:00
Paul Licameli
d7753f7acd Rename old .cpp files, add new .h files 2019-06-18 16:01:05 -04:00