1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-09-19 09:30:52 +02:00

847 Commits

Author SHA1 Message Date
freddii
534359de6c
Fix minor typos (#720)
Co-authored-by: freddii <https://freddii@github.com>
2021-01-12 11:56:09 +00:00
Paul Licameli
c67842f525 Bug2494: Label cut/copy/paste on Mac and the system clipboard...
... The fix also requires commit 58ad95e7981c9a2b116f318539c37889281baabe of
https://github.com/audacity/wxWidgets.git in the wxWidgets build
2020-12-02 17:50:39 -05:00
Paul Licameli
8e28a257a5 Bug2588: Amend the fix at 3c76cea to be safe during append-record 2020-11-24 13:35:42 -05:00
Paul Licameli
caa312ab7b Remove some unneeded #includes and forward declarations 2020-11-20 13:47:47 -05:00
Paul Licameli
f82b23d9d4 Register MakeTrackShifter properly 2020-11-20 13:15:01 -05:00
Paul Licameli
6050edb3ca Bug2598: Envelope edit not dependend on visibility of channels...
... And other rewrites.  Don't use a cache of wave clip X coordinates computed
during drawing.
2020-11-19 22:29:21 -05:00
Paul Licameli
3c76cea190 Bug2588: Click to join clips shouldn't depend on channel visibility 2020-11-19 21:32:59 -05:00
Paul Licameli
9d6cfcc746 WaveTrackView::BuildSubViews can be simplified...
... The setting of scale type now happens in the default constructor of
WaveformSettings, which calls LoadPrefs.

Since creation of WaveformSettings is always forced, we don't need the
distinction between WaveTrack::GetWaveformSettings and
WaveTrack::GetIndependentWaveformSettings.

That distinction was more analogy with the handling of SpectrogramSettings that
we don't need now.
2020-10-10 11:27:06 -04:00
Paul Licameli
e5a7e6fb21 Remove unnecessary line...
... This is a vestige of the time when "Waveform" and "Waveform dB" were
considered separate wave track view types.  But now that scale choice is
independent of Waveform vs. Spectrogram choice, there is no possible change of
scale type happening here, requiring invalidation of the vertical ruler.
2020-10-10 11:26:24 -04:00
David Bailes
cce2c7b883 Bugs 2558 2559: After clip left/right, selection start can be wrong
Problem:
In DoClipMove() in ClipMenus.cpp, there are a couple of problems in the code for the adjustment of the new value t0 due to potential rounding errors:
1. The code uses the start and end of intervals, and these values are not updated after the move.
2. It's assumed that the same correction is valid for all track types.

Fix:
Implement an adjustment which depends on track type, and does not use the start and end values of intervals.
2020-10-07 13:27:09 +01:00
Paul Licameli
783183a4dd Dragging a label from track to track may also carry clips with it 2020-09-21 17:31:48 +01:00
Paul Licameli
785857a883 Make FindCorrespondence invocable repeatedly to accumulate pairs 2020-09-21 17:31:48 +01:00
Paul Licameli
cc554350aa Simplify TemporaryClipRemover 2020-09-21 17:31:48 +01:00
Paul Licameli
2b542bf734 Move TrackShifter subclasses each to its own new source file...
... These do not require header files; they are tiny proto-plugins that work
by registration of AttachedVirtualFunction overrides at startup.

Dependency may go from them to TrackView subclasses but not back; so in
principle a reduced Audacity without time-shift could be linked that still uses
the TrackView subclasses.

But other work to make the hit test for the Time Shift tool registrable would
have to precede that.
2020-09-21 17:31:48 +01:00
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
3fcda6fc3c Fix sync-lock behavior of time shift, don't move too many other tracks 2020-09-21 11:32:19 -04: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
6e0b5b690a More control over HitTest behavior moved into the Track Shifter classes 2020-09-20 00:31:39 -04:00
Paul Licameli
f204ee3192 Always pass ViewInfo to TrackShiftHandle::HitTest 2020-09-20 00:30:07 -04:00
Paul Licameli
637ce894c1 Pass project to TrackShifter factory, which LabelTrackShifter will need 2020-09-20 00:30:06 -04:00
Paul Licameli
14dc5af223 Pass optional extra information into TrackShifter::HitTest ...
... Because LabelTrack, unlike the others, will also need a mouse y coordinate.

The extra information is present when using the time-shift tool but not when
using the items in ClipMenus.
2020-09-20 00:30:01 -04:00
Paul Licameli
3b903ee77d TimeShiftHandle doesn't need Track subclasses 2020-09-20 00:26:48 -04:00
Paul Licameli
9d52100f5c Remove TimeShiftHandle members no longer used (an much setup) 2020-09-20 00:26:48 -04:00
Paul Licameli
3009bdde2c Another TrackShifter method eliminates a use of capturedClipArray 2020-09-20 00:26:48 -04:00
Paul Licameli
c98285c544 New method of TrackShifter, simplify ClipMoveState::DoSlideHorizontal...
... Also the clips to shift within a WaveTrack are tested all at once, more
simply
2020-09-20 00:26:47 -04:00
Paul Licameli
764773479e Another method of TrackShifter removes a TypeSwitch in Time Shift 2020-09-20 00:26:47 -04:00
Paul Licameli
32c0d462b7 Another method of TrackShifter to test before attachment of intervals 2020-09-20 00:26:47 -04:00
Paul Licameli
716008e293 TrackShifter handles removal and reinsertion of clips 2020-09-20 00:26:47 -04:00
Paul Licameli
633b2e28bc Different procedure, same results, to find corresponding tracks...
... for shifting of clips among tracks

But this (temporarily) breaks the behavior of dragging back to the original
clip without first releasing the mouse
2020-09-20 00:24:30 -04:00
Paul Licameli
d3ab8b7f76 Compatibility sanity check for inserting clips into a WaveTrack...
... And don't move from the shared pointer argument
2020-09-19 19:16:47 -04:00
Paul Licameli
1a11b81deb Simplify dragging clip when mouse is over other track...
... than the one clicked in; and the clip can't fit into the new track, but it
can still slide horizontally within its track.

This eliminates a redundant use of WaveClip::Offset().
2020-09-19 19:16:46 -04:00
Paul Licameli
5591e1da0a Eliminate some uses of ClipMoveState::capturedClip 2020-09-19 19:16:46 -04:00
Paul Licameli
4f159a7629 New method of TrackShifter moves a calculation out of ClipMenus 2020-09-19 19:16:45 -04:00
Paul Licameli
bc7f527a3b Lower mCapturedTrack into ClipMoveState, simplify one member function 2020-09-19 19:16:45 -04:00
Paul Licameli
329221b392 Lower more into Init(); ClipMenus uses ClipMoveState opaquely 2020-09-19 19:16:45 -04:00
Paul Licameli
00f761eb5e TrackShifters responsible for snapping; remove a TrackList::Visit...
... Also dependency of TimeShiftHandle on LabelTrack, lately added, is removed
2020-09-19 19:16:45 -04:00
Paul Licameli
eb22892064 TrackShifters decide what parts move or stay fixed...
... for now redundantly with the older logic.

Also shorten a function name to Init
2020-09-19 19:16:43 -04:00
Paul Licameli
c279fb6588 Choose track or clip shifting behavior without a TypeSwitch...
... Preserving existing behavior, but maybe these cases should be reconsidered
and made more uniform.  (e.g. should hit test on NoteTrack sometimes miss, as
with WaveTrack?)

Also made details of WaveTrack hit testing consistent with what ClipMenus does
2020-09-19 13:23:47 -04:00
Paul Licameli
8f8c20ac80 TrackShifters can classify track intervals as fixed or not 2020-09-19 13:23:47 -04:00
Paul Licameli
d8a894b95b Define TrackShifter, subclasses, factory method; collect them...
... in TimeShiftHandle.  They do nothing useful yet, but responsibilities
will shift into them.

TypeSwitch is avoided and the subclasses are defined in appropriate places
for dependency management, thanks to AttachedVirtualFunction.
2020-09-19 13:23:47 -04:00
Paul Licameli
1501f09bf1 An argument of AddClipsToCaptured overload always true, so simplify 2020-09-19 13:23:47 -04:00
Paul Licameli
4653b5ed3d TrackClip moved to TimeShiftHandle; Snap doesn't use Track subclasses 2020-09-19 13:23:46 -04:00
Paul Licameli
dc9eaf6a3a One less delegating ctor of SnapManager, move code to TimeShiftHandle 2020-09-19 13:23:46 -04:00
Paul Licameli
6337e1ccf4 Reordered SnapManager ctor arguments, added AudacityProject & 2020-09-19 13:23:46 -04:00
Paul Licameli
c7896a3656 Bug2493, Enh2460: Multi-view option in Tracks preferences & macros...
... Implemented giving the Multi-view choice the special implementation that it
needs.

The "multi" choice is always last in the preference and in the command editing
drop-down menus, but that could be changed.

Multi-view should not be treated as another registered kind of sub-view on par
with others.  This would complicate the implementation in worse ways.
2020-09-10 15:28:28 -04:00
Paul Licameli
42d99db8b8 Revert "Bug 2493 - No command for setting multi-view"
This reverts commit 7e573b9b2ffa4dd013bf965bc79755a314db258a.
2020-09-10 13:51:38 -04:00
James Crook
7e573b9b2f Bug 2493 - No command for setting multi-view
Bug 2460 - Enh: Can't select "Multi-view" as default view mode in Tracks preferences

This fixes both.
2020-09-09 17:35:39 +01:00
binarywisdom
a10a1b81aa fixed bug/enh 266 2020-09-04 11:39:11 -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