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

314 Commits

Author SHA1 Message Date
Paul Licameli
750fc34fac Clarify what the TrackList events are for...
Also fixes this bug:

Vertical rulers did not narrow as needed after deletion of the lowest track.
2017-06-25 03:00:28 -04:00
James Crook
86901a00a1 Fix MixerBoard Theming
Fixed so that updates to theme are applied immediately.  Previously theming only worked properly after a restart with the new theme.  Paul found that you could create a Chimera MixerBoard with a track in each of the four different themes.

I chose to completely recreate the MixerBoard on a prefs update, rather than the more fiddly detail of retheming each component of it.
2017-06-22 11:53:49 +01:00
Paul Licameli
8ef5f696d8 Define BackgoundCell, move some things into it 2017-06-15 08:21:41 -04:00
Paul Licameli
c3f5fea5fc TrackPanel still draws Miminize and Close, but no longer handles...
clicks on them...

... also implemented ESC key for those drags
2017-06-15 08:21:36 -04:00
Paul Licameli
d834bcdbd1 Move some command handlers for selection and focus out of TrackPanel 2017-06-11 11:03:28 -04:00
Paul Licameli
a9f7cb26e7 Move selection state into AudacityProject, out of TrackPanel 2017-06-11 10:40:55 -04:00
James Crook
adc7312954 Auto-Select off by default.
I've implemented three states for what to do if no selection:
0 - Grey out (no longer used)
1 - Auto-select
2 - Give the warning message and try again.
2017-06-09 19:40:28 +01:00
David Bailes
b2d8f36969 Fix for bugs in keyboard clip commands due to rounding errors
When When two clips are immediately next to each other, the GetEndTime() of the first clip and the GetStartTime() of the second clip may not be exactly equal due to rounding errors. The existing code assumed they were equal, and this lead to the wrong clip boundaries or clips being found.

There are a number of ways of fixing this which could be explored. The current solution involves changing only the code for the keyboard interaction with clips.

The fix:
1. The test used for two clips being immediately next to each other is that GetEndSample() on the first clip is equal to to GetStartSample() on the second clip.
2. When searching for the start/end times of clips, the cases where GetEndTime() and GetStartTime() are not equal are taken into account. This is done in the two functions AudacityProject::AdjustForFindingStartTimes and AudacityProject::AdjustForFindingEndTimes.
2017-05-10 09:24:25 +01:00
James Crook
fefc856901 Update slider in tracks on theme change. 2017-04-05 20:16:12 +01:00
Paul Licameli
0d7250578d Other methods of WaveTrack return void, will throw on failure instead 2017-03-31 18:26:52 -04:00
Paul Licameli
1552ff188f When opening a file into a new project, delete the project on failure 2017-03-21 14:11:28 -04:00
Paul Licameli
54c1b0c955 Exception safety in: opening and saving of projects 2017-03-21 14:11:25 -04:00
Paul Licameli
82dd7545c9 Reviewed uses of release(); prefer Destroy_ptr to hold window objects 2017-03-21 14:11:18 -04:00
James Crook
5c1f4d24b5 Menu rearrangement merged from DarkAudacity 2017-03-19 16:43:51 +00:00
Paul Licameli
5036583549 Fewer inclusions of AudacityApp.h 2017-03-17 17:52:24 -04:00
Paul Licameli
81285ee0c1 More const and override 2017-03-17 17:52:20 -04:00
Paul Licameli
93c0b5a92d Add button to History dialog to clear the clipboard & space calc 2016-11-07 11:25:27 -05:00
Mark Young
a4ae301a5b Bug 1402, rewrite logic for the display of hours and minutes and ensure we use one routine for this. 2016-10-02 22:56:04 +01:00
Paul Licameli
88611a4530 Fewer C-style pointer casts of tracks; comments justify static_cast 2016-09-15 12:12:43 -04:00
James Crook
83e355dc65 Bug 322 - (Residual) Project numbers renumbered after closing a project.
Now the project number is the order of creation.  Once assigned, project numbers do not change.
2016-09-10 16:59:23 +01:00
James Crook
bf06b0485f Bug 1507 - Project may be overwritten by new project without warning 2016-09-08 17:51:00 +01:00
James Crook
9cb7e23e05 Bug 322 - "Save Changes?" dialog does not indicate which project is being closed
When there is ambiguity about which project is being saved, the project title bars now change to be more informative.
2016-09-05 19:20:08 +01:00
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
James Crook
05fe684114 Ungrey more actions, if paused.
This introduces a new variable, mStopIfWasPaused (default true).  Actions which require AudioIONotBusyFlag will now stop the audio, if audio was busy but paused and attempt to continue.

We could perhaps make mStopAudioIfWasPaused into a preference, but I don't think we need to keep even the option of the old behaviour.
2016-08-20 18:52:30 +01:00
Paul Licameli
5752dbab02 shared_ptr manages AudacityProject objects, so weak_ptr may be used 2016-08-15 12:43:50 -04:00
Paul Licameli
fe5ab9a462 Remove the naked new in allocation of AudacityProject 2016-08-14 15:24:59 -04:00
Paul Licameli
46f38708ed Dir manager uses std::shared_ptr 2016-08-13 12:23:05 -04:00
Paul Licameli
a52f7f8410 new -> NEW in comments, so text search for naked new excludes them 2016-08-08 10:07:37 -04:00
Paul Licameli
27527ebf5c One less indirection for arrays of capture and playback tracks 2016-08-08 07:51:26 -04:00
Paul Licameli
186679b3a6 RAII for locking the all-projects mutex 2016-08-08 07:40:16 -04:00
Paul Licameli
cfd7648fce Remove some naked new amd delete in: Project 2016-08-08 07:40:15 -04:00
Paul Licameli
c9422aaea1 Bug1438: Fix horizontal scrollbar, while still fixing Bug 1197 2016-07-08 02:16:00 -04:00
Paul Licameli
4f1c8a3f2f Bug1438: Fix horizontal scrollbar, while still fixing Bug 1197 2016-07-08 02:14:47 -04:00
Paul Licameli
625584d99a Bug1431: Undocked toolbars should hide when project window minimizes 2016-06-29 15:13:38 -04:00
Paul Licameli
ae14cb0dbc Allow tabbing to the button on the time ruler...
... by making the ruler and the upper tool dock part of one panel
2016-06-25 16:08:38 -04:00
Paul Licameli
1b1b0ba5e7 Remove forward declaration of nonexistent type 2016-06-12 08:24:27 -04:00
Paul Licameli
a610070038 May always scroll before zero during transport when head is pinned...
... regardless of preferences, but if the Tracks preference is not checked,
don't stay scrolled left of zero after stopping.
2016-06-08 18:33:02 -04:00
Paul Licameli
8dab37de01 Scrub menu check items change pushed state of scrub toolbar buttons 2016-06-06 00:48:50 -04:00
Paul Licameli
e4fadf4aaf Improve scrubbing speed control (2 finger swipe) on Mac 2016-05-28 11:59:22 -04:00
Paul Licameli
c66262d790 Double click on Record button pins record head right, not center 2016-05-17 12:25:39 -04:00
Paul Licameli
03ec020085 Revert "Help for debugging of some event handling"
This reverts commit 9bfd66b06ca908efe9bd3adfd7f78cf143d18688.
2016-05-11 13:46:32 -04:00
Paul Licameli
9bfd66b06c Help for debugging of some event handling 2016-05-11 13:25:00 -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
014d5ab93c Type safety in the use of command flags, and make enum wide, allowing more bits 2016-05-05 20:02:13 -04:00
Paul Licameli
f48694ef47 Move the code that scrolls during scrub out of Scrubbing.cpp 2016-05-03 22:43:19 -04:00
Paul Licameli
9ab0e42f29 Control scrub with motion, click, drag, wheel almost anywhere in main window...
... if the event is not handled and skipped by sub-windows first, such as for
toolbar button clicks.

(But track panel clicks are skipped even after doing something, so they may
also cause seeking besides other responses.  So click can seek AND set cursor.)

This is meant to make drag to seek and wheel for change of speed easier,
without needing to keep the mouse in the narrow time ruler.

Also lets you click in the ruler, then move in any direction, and not miss the
motion event that should start the scrub playback.

The event handling is a bit of a hack, using propagation.  It does not use
capture.
2016-04-26 12:12:06 -04:00
Paul Licameli
d5915491b3 Bug1342: Loop-play (and other things) before scrub (and other things)...
... should not disable auto-scrolling of the window during playback.
2016-04-18 17:50:17 -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
185d5e132d Avoid some wxString copies 2016-04-17 13:58:21 -04:00