1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-01 08:09:41 +02:00

12750 Commits

Author SHA1 Message Date
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
2b06115b32 Clip Left/Right general enough for note tracks: one less TypeSwitch! 2020-09-19 19:16:46 -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
958cb1b4fd Move some Time Shift logic into new TrackShifter classes...
... There is an AttachedVirtualFunction which is a factory for TrackShifter,
and subclasses of it appropriate for different kinds of tracks.

The logic to choose the intervals of tracks that move is replicated in them.
The old logic is not yet removed.

Enough logic is moved into them, so that snapping in TimeShift, and DoClipMove
in ClipMenus.cpp, make no direct special use of classes WaveTrack and WaveClip.

Not yet defining a new subclass for shifting of labels -- that will be the last
step.
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
1501f09bf1 An argument of AddClipsToCaptured overload always true, so simplify 2020-09-19 13:23:47 -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
b75ab214cf Snap does not depend on subclasses of Track 2020-09-19 13:23:46 -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
aa4b808714 More constructors for SnapManager...
one taking candidate list directly, the others delegating to it.

Some members removed, some in-class initializers.

The special constructor for TimeShift only has extra arguments.  It will go
away.
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
6510b859f3 Define new virtual functions Track::GetIntervals (const and non-const) 2020-09-19 13:23:45 -04:00
Leland Lucius
c60bf1c994 Fix build 2020-09-18 09:55:49 -05:00
Leland Lucius
6749d5b6fa Bug 1215 - Incorrect splits produced by Change Tempo with leading whitespace 2020-09-18 09:24:45 -05:00
Leland Lucius
3605d73d12 Bug 2534 - Change Speed merges selected clip with adjacent clips 2020-09-18 09:00:50 -05:00
Leland Lucius
5bca69ca31 Fixes for bugs 2534 and 1215 2020-09-17 23:22:00 -05:00
Paul Licameli
9e41e8fa7d Delay closing of databse at close some more...
... So that you don't get an error message, when you close a project without
saving changes, with the mixer board open
2020-09-17 22:26:25 -04:00
Paul Licameli
1d8cbf2798 Now cure the error dialogs alluded to in past commit 2020-09-14 15:16:54 -04:00
Paul Licameli
cbd21c5fff Fix crash on exit, which could be seen at least on Mac, if you...
... Start Audacity; generate some noise; shift clip with Time-Shift tool;
command+Q to exit; say No to save changes.

The scope of a GuardedCall needs to be expanded, because Conn() can throw,
so that no exceptions escape the destructor of SqliteSampleBlock.

But now there is an error dialog on exit instead of a crash.
2020-09-14 15:14:19 -04:00
Paul Licameli
c5c7a6d08a Fix Mac build 2020-09-14 15:05:42 -04:00
James Crook
b0e931bdd4 Fix compile error on Linux
(pointer to on-stack temporary).
2020-09-14 19:43:58 +01:00
James Crook
13c5fe476f Remove test code which generated a disk full warning. 2020-09-14 19:00:25 +01:00
James Crook
5407f92c0c Fix Mac Build.
Brackets for XO were in the wrong place.
2020-09-14 18:56:57 +01:00
James Crook
caf4eadb97 Help button for many warning messages; Restored warning icon.
The error icon was gone because we are now using the ErrorDialog, which didn't have it.  So added back explicitly.  I decided to go with wxART_WARNING rather than wxART_ERROR because nearly all of these present as warnings.
2020-09-14 17:43:28 +01:00
James Crook
b9212d8393 Bug 2543 - Enh: Project Items are not ticked by default in Project Recovery Dialog 2020-09-13 12:47:17 +01: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
f06b9a9c71 UnitaryProject-25 Disk Full Errors
The disk full error text is now shorter/clearer and has a Help button with it.
2020-09-10 12:58:22 +01:00
binarywisdom
6e4f163317
fixed bug 2109 (#664) 2020-09-09 17:43:41 +01: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
Paul Licameli
a20f1cdf13 Doxygen comments for AttachedVirtualFunction 2020-09-08 23:33:08 -04:00
James Crook
f5e00e5b51 Fix typos in doxygen dependencies documentation page. 2020-09-08 15:47:34 +01:00
James Crook
3b235dd86d First go at a 'Dependencies' page for Audacity source code. 2020-09-08 14:40:31 +01:00
Paul Licameli
8a86fe139f Bug2531: need progress indication when discarding undo history...
... You may see this also when abandoning lots of redo history, and not only
when doing compaction.

If in compaction you discard much undo and also much redo, you may see two
progresses.

It's debatable whether this might have been better implemented by reuse of
ProjectFileIO::DeleteBlocks instead, putting callbacks to a progress indicator
in the function InSet().  But I wanted to avoid more dependency onto
ProjectFileIO.

Doing real work in DeleteBlocks() is supposed to happen only if there is a bug
elsewhere that allowed orphans.  So, still no progress indicator there.
2020-09-06 17:54:14 -04:00
Paul Licameli
dfd313f8fa SqliteSampleBlock has back-pointer to its factory...
... and thence to its database connection, indirectly.
2020-09-06 17:09:51 -04:00
Paul Licameli
a2e22dc17b TransactionScope for performance also when abandoning redo states 2020-09-06 17:05:33 -04:00
Paul Licameli
495b4afe46 Doxygen comments for TransactionScope 2020-09-06 17:04:47 -04:00
Paul Licameli
327ada3c46 Give a "yellow zone" warning for checkpoint failure without data loss 2020-09-06 12:58:48 -04:00
Leland Lucius
5342d980fb Bug 2367 - Change Pitch effect may create spurious clip at end
Fixes residual mentioned in Comment #11
2020-09-06 03:37:57 -05:00
Leland Lucius
90a69a0173 Bug 2535 - Audacity fails to build on 32-bit Linux 2020-09-06 03:13:16 -05:00