1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-22 07:10:06 +02:00

217 Commits

Author SHA1 Message Date
Paul Licameli
5761972dfa BHug1488: Don't crash exiting from command-line benchmark test...
Problem was that cfd7648fce2388ec8ae35b38004f2ae111c484af 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