Commit graph

41228 commits

Author SHA1 Message Date
Paul Davis
96e5229ad1 temporal: in the event of the most common logic failure, provide more info
TEMPORAL_MAP_ASSERT() doesn't give us any actual values or context.
2025-08-27 16:47:13 +02:00
Paul Davis
f1606db64a in launchkey 4 code, use new Meter::bbt_delta() not ::bbt_delta 2025-08-27 16:47:13 +02:00
Paul Davis
0d6402e875 remove incorrect bbt_delta() in BBT_Time, provide Meter::bbt_delta
There are two implementations here, the more efficient one (commented out) does
not work correctly yet.
2025-08-27 16:47:13 +02:00
Paul Davis
69cc153470 check for null ActionGroup in ActionManager::drop_action_group() 2025-08-27 16:47:13 +02:00
Paul Davis
a1bfe82d49 EditingContext: don't call drop_action_group() if an action group was not created
Example would be an audio clip editor that does not define MIDI actions
2025-08-27 16:47:13 +02:00
Robin Gareus
664a2b4a8e Amend c6a49fdd50 drop automation actions
This fixes a crash when showing the same Pianoroll again,
since actions a already present, a NULL reference was pushed
to session_sensitive_actions. Closing a session then crashed
accessing a NULL Action.
2025-08-27 16:47:13 +02:00
Robin Gareus
6a4d865452 Remove another debug message 2025-08-27 16:47:13 +02:00
Robin Gareus
985deae280 Don't re-create MIDI Region Editor when it already exists 2025-08-27 16:47:13 +02:00
Robin Gareus
84046ebc35 Hide debug messages in optimized builds 2025-08-27 16:47:13 +02:00
Robin Gareus
c11b4f7bdb Use main editor for loop-range undo/redo - fix crash
While CueEditor is-a HistoryOwner, session specific
changes such as Location don't belong in EditingContext.

This fixes a heap-use-after-free crash since MementoCommand
was free()ed twice. Once via ARDOUR::Location::~Location
and earlier due to direct Destructible::drop_references
from the History.

This partially reverts 04a8fb1eb6
2025-08-27 16:47:13 +02:00
Franke Burgarino
3197c787b1 MCU: hide phase/solo controls for master 2025-08-27 16:47:13 +02:00
Robin Gareus
464303da5e Handle special case of using unmanaged widgets to Frame
This happens in in Ardour's Preference dialog with
e.g. BufferingOptions:

~OptionEditorContainer deletes the Option, which in turn
deletes the Widget BufferingOptions:_buffering_presets_combo
Since the widget is not managed it is not removed from its
parent.

Later ~OptionEditorContainer disposes the page layout, which
eventually also calls the Frame d'tor, causing a heap-use-after-free.
2025-08-27 16:47:13 +02:00
Robin Gareus
9cad318cfe Towards clean exit 2025-08-27 16:47:13 +02:00
Paul Davis
64e714b89d remove some debug output 2025-08-27 16:47:13 +02:00
Robin Gareus
c427d1d67a Always clean up after ourselves.. 2025-08-27 16:47:13 +02:00
Robin Gareus
5bf5ab6f69 Add "note" to short grid labels
see also d2512c814a
2025-08-27 16:47:13 +02:00
Robin Gareus
3a6c52314e Add "clear" button to RTA Window 2025-08-27 16:47:13 +02:00
Robin Gareus
a85db361eb Add RTA clear feature 2025-08-27 16:47:13 +02:00
Paul Davis
277c384a5c fix type from b489d466cf that resensitized the ghost note, causing crashes
Oddly, much, much easier to make happen on macOS and/or mixbus
2025-08-27 16:47:13 +02:00
Paul Davis
17f74643a7 remove infinitely recursive, never-called method from MidiView 2025-08-27 16:47:12 +02:00
Franke Burgarino
62989f1cbc remove share/icons/hicolor/index.theme 2025-08-27 16:47:12 +02:00
Franke Burgarino
f7d01ea8e9 MCU: give UF1 & UF8 seperate device configs 2025-08-27 16:47:12 +02:00
Franke Burgarino
7e57b644d6 MCU: add master/monitor to global/mixer view if device has no master fader 2025-08-27 16:47:12 +02:00
Paul Davis
c282eed67c update preferences metadata (source text and C++ code) 2025-08-27 16:47:12 +02:00
Paul Davis
e82e08e60c also scale drag move threshold by UI scale
If UI scale is > 1, pixels are likely small, so it seems appropriate to scale
2025-08-27 16:47:12 +02:00
Paul Davis
01701bdd1d expose drag sensitivity in preferences 2025-08-27 16:47:12 +02:00
Paul Davis
54bea42216 scale move threshold by UIConfiguration parameter 2025-08-27 16:47:12 +02:00
Paul Davis
8d7969e72b change use of MoveThreshold.first to reflect pixel units 2025-08-27 16:47:12 +02:00
Paul Davis
c260640502 use both relevant UIConfiguration parameters in ::move_threshold() 2025-08-27 16:47:12 +02:00
Paul Davis
9d36bace2d add move threshold sensitivity parameter for UI 2025-08-27 16:47:12 +02:00
Paul Davis
bc3e2b1f6d move threshold for drags goes back to pair<int,int>
And for now, there's only a single implementation, though other types of
drags could implement it if needed. There really seems to be no need.

Note that the x-axis threshold is 3x in the case of a copy-drag.
2025-08-27 16:47:12 +02:00
Paul Davis
92f5f819b7 move _copy member of some types of drags into Drag base class
this allows us to use it when computing move thresholds
2025-08-27 16:47:12 +02:00
Robin Gareus
cf4eb99ed8 Handle case where a custom MenuElem is added to the dropdown 2025-08-27 16:47:12 +02:00
Paul Davis
d18ecd5084 unit tests: fix an unusual deadlock/block in TempoMap::write_copy()
this call works in other tests, no time to investigate it right now, and
technically the test doesn't require a write copy at all.
2025-08-27 16:47:12 +02:00
Paul Davis
a3cf0a1570 unit tests: use std::cout for any debug output in tempo map cut buffer test 2025-08-27 16:47:12 +02:00
Paul Davis
3d4add15bc temporal: implement TempoMap::bbt_distance() but do not use it
This was implemented to try to fix paste() but was not needed. It might be
useful in the future, or just as an expression of the logic of this. Note that
the BBT_Offset it returns only has the beats field set, which is ... odd. So
this is likely not quite finished.
2025-08-27 16:47:12 +02:00
Paul Davis
5e66f6d363 temporal: undefine macro after use 2025-08-27 16:47:12 +02:00
Paul Davis
ea00d3573d temporal: show BBT marker point names in operator<< 2025-08-27 16:47:12 +02:00
Paul Davis
af4c7cd960 temporal: fix TempoMap::paste() to pass unit test
the BBT times of the newly inserted points during paste() are meaningless until
we recompute them using ::reset_starting_at(). So don't try to compute some
sort of likely value, just use the value from the cut buffer, and call
reset_starting_at() after every point inserted.
2025-08-27 16:47:12 +02:00
Paul Davis
e47b3636d9 remove crashing assert() when rendering scroomer
Too hard to get a floating point assert correct, but I think this is still a little
incorrect because we do not scale the kbd size when rendering it.
2025-08-27 16:47:12 +02:00
Paul Davis
1d1a53da46 no more BBT_Time round/round_up methods (GUI edition) 2025-08-27 16:47:12 +02:00
Paul Davis
230f08b9fd temporal: BBT_Time cannot have any round_to_*() or round_up_to_*() methods
A meter (time signature) is required to do the math correctly for any operation that may
cross or reach the next bar boundary, which round_to_*() and round_up_to_*() may do.
2025-08-27 16:47:12 +02:00
Robin Gareus
2079401b6f Use short labels for grid and beat-div dropdown 2025-08-27 16:47:11 +02:00
Robin Gareus
daaa8641b5 ArdourDropdown: use action's short-label for display text 2025-08-27 16:47:11 +02:00
Robin Gareus
fc22b4dbf5 Pianoroll: the return of the draw box (amend 8ffd45c3c) 2025-08-27 16:47:11 +02:00
Robin Gareus
16097dab8c Don't expand GUI as much on first load
The editor-toolbar still needs a major cleanup, it's
very busy
2025-08-27 16:47:11 +02:00
Robin Gareus
3e99118701 Use new YTKMM API instead of ytk+ 2025-08-27 16:47:11 +02:00
Robin Gareus
430b326174 YTKMM: expose ytk_set_child_packing 2025-08-27 16:47:11 +02:00
Robin Gareus
ee1a507c36 Remove cruft 2025-08-27 16:47:11 +02:00
Robin Gareus
f59a512545 Tweak editor bottom pane packing, never unpack the property box 2025-08-27 16:47:11 +02:00