Commit Graph

884 Commits

Author SHA1 Message Date
Robin Gareus 8794145c9d
Centralize setting undo/redo action sensitivity
This fixes undo/redo action sensitivity for non-editor
history stack changes.

Notably recording was not undoable, because the butler
thread creates the reversible "capture" command.
2023-06-02 18:11:53 +02:00
Robin Gareus ffa893f23c
Add a warning that cut/copy section does not yet include the the Tempo Map 2023-05-18 03:45:53 +02:00
Robin Gareus 299e67f250
Facilitate multiple section paste operations 2023-05-17 23:30:13 +02:00
Robin Gareus b6b1aec50e
Fix selection after region duplicate (amend cfca2d2a) 2023-05-15 19:28:33 +02:00
Robin Gareus cfca2d2af9
Significantly speed up multiple region duplication
When multiple regions are duplicated Playlist::duplicate
is called sequentially for each region.

Previously that lead to a call to Playlist::flush_notifications
after each step, which is rather expensive.
Playlist::ContentsChanged and Playlist::LayeringChanged
trigger SessionEvent::Overwrite and GUI updates.
2023-05-14 20:42:31 +02:00
Paul Davis 87b5849a7b kbd bindings: fix issues with delete & backspace bindings in draw/i-edit mode
We now use the same actions in all modes, and the logic is:

1. is there a selected mixer strip and are we in it: if so, delete selected
   processors
2. are we in draw or internal mode? if so ..
   2a. if there are selected control points, delete them
   2b. if not, attempt to delete MIDI notes
   2c. done
3. continue with delete operation as before
2023-04-25 11:38:16 -06:00
Paul Davis 89c7159bc5 prefer auto const & as an amendment to b4291cfb32 2023-04-12 12:45:11 -06:00
Paul Davis 73f41a4d3b remove debug output 2023-04-12 10:38:57 -06:00
Paul Davis 36525a1ada rippling - use a list and ::push_front() to avoid having to reverse 2023-04-12 10:38:27 -06:00
Paul Davis b4291cfb32 some more C++11 loop-auto-fication 2023-04-12 10:16:09 -06:00
Paul Davis 117c751293 fix undo for multi-non-contiguous region cut/delete (#9295)
Defer all ripples till after cut/delete. Then perform them
from the latest to the earliest.
2023-04-12 10:16:09 -06:00
Robin Gareus f57a9d84df
Do not incrementally ripple during cut/delete #9295
When cutting multiple regions with Ripple-ALL, removing
the first region ripples the remaining tracks which includes
selected regions on those tracks which are to be cut later.
2023-04-06 02:18:42 +02:00
Robin Gareus dd542b8f4d
Use ARDOUR::PlaylistSet instead of local typedefs 2023-04-06 02:13:51 +02:00
Robin Gareus a0286f2e6f Expose cut-copy-section in the editor
This is still a bit of an experiment, there may need to be a dedicated
ruler for sections, or a side-bar that allows arranging.
2023-03-31 23:13:20 +02:00
Robin Gareus 91c0f143ec Set sensitvity of "Insert Selected Region" 2023-03-31 22:06:41 +02:00
Paul Davis b35518e212 switch from boost::{shared,weak}_ptr to std::{shared,weak}_ptr
This is mostly a simple lexical search+replace but the absence of operator< for
std::weak_ptr<T> leads to some complications, particularly with Evoral::Sequence
and ExportPortChannel.
2023-03-24 14:19:15 -06:00
Alexandre Prokoudine b8c4034af5 Fix a user-visible typo 2023-02-13 03:05:38 +03:00
Paul Davis ee151ee36e fix track scrolling by using API to reset controls_layout, not doing it directly 2023-02-01 13:10:43 -07:00
Paul Davis b8e9e67f78 tweak ::define_one_bar() API to allow correct undo/redo command name 2023-01-16 14:57:23 -07:00
Paul Davis db987cf046 fix deadlock in Editor::define_one_bar() 2023-01-16 14:57:23 -07:00
Olivier HUMBERT 4cb67f83a7
Make some string translatable 2023-01-01 19:41:43 +01:00
Robin Gareus 0f949bc02b
Add region polarity invert to Region menu 2022-12-17 13:15:42 +01:00
Robin Gareus 9819cdb117
GUI support for per region polarity invert 2022-12-17 13:15:37 +01:00
Paul Davis 5e9e21911c corrections for methods that move playhead to region boundaries
1. "not found" is now indicated by a timepos_t::max() value, not a negative one.
2. if the direction to search is negative we should decrement (when possible)
before searching, to avoid finding the current position.
2022-12-10 18:13:48 -07:00
Paul Davis 4fdd8646b4 fix positioning of regions during multiduplicate or fill track operations 2022-12-10 09:43:43 -07:00
Paul Davis 093da3f349 fix logic reversion during rebase for duplicate regions 2022-11-16 09:36:23 -07:00
Paul Davis 570aead3b1 add explanatory comment re: region duplication positioning
This is currently an unsolved problem-that-may-not-be-a-problem.
2022-11-16 08:39:33 -07:00
Robin Gareus b82900858f
Do not limit stack-size when freezing tracks
This fixes an issue with plugin state save/restore. Some
require excessive stack to do that (looking at you b.oops.lv2).
The main GUI thread has no stack limit, so this is only an issue
when calling state save/restore from background threads.
2022-11-13 03:02:00 +01:00
Robin Gareus 3fcd8b659d
NO-OP: remove duplicate return 2022-11-13 00:23:58 +01:00
Ben Loftis f8ea94e86c Fix jump_forward_to_mark in the case where you are already located on a marker
* first_mark_after() correctly expects a timepos_t to compare with locations
* BUT the playhead position is always in samples, by definition
* in many cases this meant the 'next' marker was the one you are already located at

* also remove the slight distinction between playhead cursor and actual play position
    (shouldn't matter, but...)
2022-11-08 20:32:32 -06:00
Ben Loftis bae336129f Add action to create named-range from Selection, and prefer that over the Region variant
* shortcut is currently already assigned to Secondary+Tertiary+R
* perhaps we could instead assign an easier shortcut Primary+M  ?
2022-11-08 19:12:56 -06:00
David Robillard bdacfb8724 Fix invalid use of Doxygen "@param" command
This is never for inline references to parameters, only for starting parameter
documentation blocks.  The "@p" command is for this, although unfortunately
Doxygen doesn't actually do anything with it and it's just an alias for code
text.
2022-10-30 20:44:28 -04:00
Paul Davis 21e8885e00 region duplication: fix positioning of multi-region duplicates 2022-10-30 17:07:22 -06:00
Paul Davis c58d052a8e fix position of duplicated regions
Several thinkos here but the most important one is that timepos_t::increment() returns
a value, rather than modifying the object
2022-10-28 14:34:34 -06:00
Paul Davis 97a544390d use TempoMapChange to manage all feasible tempo map editing operations 2022-10-27 13:43:13 -06:00
Paul Davis 9c5d396334 use TempoMapChange for define_one_bar 2022-10-27 12:12:28 -06:00
Robin Gareus 39b85bd2d4 Commit TempoChange undo operation after map update
Tempo Map updates can change a region's position/length, in which case
region-automation may follow the region, and DiskReader:: playlist_ranges_moved
will save additional undo information.

These MementoCommand(s) need to be included in the undo operation.
2022-10-27 08:40:09 -06:00
Paul Davis a6b63b1cca automation region paste: snap at paste, not at cut
This fixes various issues with this operation, mostly because it was really the
wrong concept to begin with.
2022-10-26 22:23:14 -06:00
Paul Davis 7337ba42f5 fix region duplicate
Missing equivalent code from 6.9 that sets position.

Also renamed scoped *_sample vars as *_time
2022-10-23 22:26:18 -06:00
Paul Davis 25ed864d87 fix find next region boundary : must use absolute value of distance
This matches semantics in 6.9 and avoids negative distances entering the
flow for various next/prev region boundary operations.
2022-10-22 14:25:05 -06:00
Paul Davis cf83815133 add clear-all-cues item to cue marker ruler context menu 2022-10-21 07:52:23 -06:00
Paul Davis 254297355e increment/decrement name changes ... out with old in with the new (gui) 2022-10-07 17:30:45 -06:00
Paul Davis 45e21de209 implement and adopt new conventions for AudioClock use
The class now has two separate methods for setting a duration or a point
value. They MUST be used appropriately, because their behavior is different.

When ::set_duration() is used in timecode mode, an extent (inclusive-end
length) is shown rather than a length.

Some objects, such as the TimeInfoBox, now deliberately shown an inclusive end
for their "end" clock, but this not universally followed, pending more feedback
from users and investigating of conventions in other DAWs.
2022-10-07 16:24:56 -06:00
Robin Gareus d9c6842ea3 Fix region property inheritance (GUI) 2022-10-07 00:36:20 +02:00
Paul Davis 0c2176dd71 move default_triggers_per_box into a namespace ; change value for Ardour to 16 (GUI edition) 2022-10-04 19:55:15 -06:00
Robin Gareus 5fb628d3ed
Use new record-mode pref (2/2), GUI control 2022-09-19 22:50:11 +02:00
Robin Gareus 97f0fac7d5
Copy region properties (2/2) - see prev commit 2022-09-19 22:49:42 +02:00
Paul Davis d2fc142e21 infrastructure and implementation to allow "q" to drive quantize-selected-notes in midi edit mode 2022-08-31 13:53:55 -06:00
itmuckel 63f94d2946 Remove unused includes 2022-08-19 09:27:19 -06:00
Colin Fletcher 31640a9a5b gtk2_ardour: implement "Unlink from unselected" for MIDI regions
An attempt to satisfy #8848.

Add a new action, "fork-regions-from-unselected", which unlinks all
selected MIDI regions from any unselected regions, but maintains links
within the selection, and add the new action to the region MIDI context
menu as "Unlink from unselected". Rename the existing "fork-region" action
to "fork-selected-regions", and amend the existing "Unlink from other
copies" menu item to "Unlink all selected regions" to (try to) clarify the
difference.

Attach the <Tertiary>U default key-binding to the new action: I personally
think it's generally slightly more useful (otherwise I wouldn't have
implemented it), though I'm not that fussed.

In the case that there's only one MIDI region selected, or that none of
the selected regions are mutually linked, both actions will have exactly
the same result. Ideally, we'd only show a single menu item in this case,
but that would require (a) implementing a function to check whether the
selection contains any linked regions, and (b) making the region MIDI
context sub-menu dynamically generated, so that it can change based on the
result of that function, neither of which I've tried to do yet.
2022-08-18 09:18:25 -06:00