13
0
Commit Graph

437 Commits

Author SHA1 Message Date
nick_m
9af9e17adc Add editor selection state to session history via a SelectionMemento, which
combines selection related editor properties with the current editor selection.

The related editor properties are:
mouse mode,
zoom setting,
left frame of the canvas,
y origin of the canvas.

Selection state now includes region views (storing the underlying region id)
and time.

This patch also fixes a region mute undo bug.
2014-12-18 11:03:10 -05:00
0f63ac06a4 Remove unused variables. 2014-12-17 18:41:23 -05:00
56ca52651e fix up requested color names everywhere.
Thank <deity> for emacs ... space-uncamelcase-word-at-point FTW
2014-12-14 16:15:38 -05:00
48a7a11974 initial pass to replace all UIConfiguration::get_XXXXXX() calls with UIConfiguration::color(name).
IMPORTANT: names have not been downcased and spaced yet, so many colors are not found
2014-12-14 12:27:07 -05:00
2bbef1f32e update_time_selection_display should work when in smart mode 2014-12-09 16:18:48 -06:00
9548b916e7 Don't switch to internal when switching to draw. 2014-12-07 23:59:07 -05:00
603748d68a Unify gain and draw tools.
There might be a few special cases lingering around from attempts at magic tool
business, but this seems to work fine as far as I can tell.
2014-12-07 20:37:46 -05:00
bbdad822cd Fix and simplify step_mouse_mode. 2014-12-07 19:04:33 -05:00
1b99e298e2 Make draw tool add points to track automation. 2014-12-07 00:26:00 -05:00
a65cd2a1b9 Make scroll work on MIDI regions when internal.
For some reason, grabbing the magic keyboard focus makes scroll stop working
regardless of what MRV::canvas_group_event() returns.  I can't figure out any
reason to grab the keyboard in this case anyway, so I just removed it.

Also simlify MRV event handling code in general.
2014-12-05 17:36:02 -05:00
8e54baa65f working compilation for new color code 2014-12-05 09:01:55 -05:00
fd9ccc7058 Use an enum for RoundMode instead of magic numbers.
No functional changes in this one (for easier auditing), but towards having
round up/down only if necessary modes, rather than kludging around that
situation with a double round as we do currently.
2014-11-16 22:35:45 -05:00
6b3a8915f3 add abort() to non-reached code
This cleans up a lot of false-positives in static analysis
and also helps compilers to optimize code paths in general.
(tagging the fatal stingstream operator as ‘noreturn’ is
far less trivial)
2014-11-14 11:30:08 +01:00
5d5d9cb9e2 Fix various sticky/broken cursor issues.
This still isn't quite right, but it's a lot less broken than before, at least.
2014-11-14 02:37:36 -05:00
4ed910748c don't show x-fade menu when right-clicking on frame handles
Fix crash with midi-regions (they have a frame-handle but no x-fade).
fixes 2nd part of #5992 (backtrace 20141021-B)

This is nicer in one way: When the cursor is "trim" the x-fade
context menu is no longer accessible.
And a bit worse: The x-fade context menu is only accessible on the
small fade-handles (boxes) and on the x-fade itself.
2014-10-28 16:43:45 +01:00
ba4d1cd1c1 remove "canvasvar_" from all functions related to obtaining values from ARDOUR_UI::config() 2014-10-21 22:58:58 -04:00
b73f725676 remove mouse zoom mode; bind z to zoom-to-range 2014-10-21 12:47:53 -04:00
148c1f1768 fix stuck key-grab/scrolling.
Problem: mouse-scrolling over a MIDI region in internal edit mode
never released “magic widget focus” (mod keys and global scrolls after
that were ignored). -> added to leave_notify.

Also, the MouseModeChanged signal needs to be emitted when internal edit,
mode changes in order to trigger MidiRegionView::mouse_mode_changed(), 
which in turn releases the magic focus while still hovering over a MIDI
region.
2014-10-21 11:07:53 +02:00
6a971e645d use new ARDOUR::Location signals in GUI
Conflicts:
	gtk2_ardour/editor_markers.cc
2014-09-19 23:06:26 -04:00
0943a559e0 shift-drag on range marker bar creates skip ranges, for now 2014-09-17 10:59:19 -04:00
261aa3258f escape should reset focus as well as abort drags/clear selection 2014-09-16 11:09:12 -04:00
1873bcfa9d More fixes for range-based automation editing.
-Remove redundant start_grab calls.
-Show gain curves in Range mode, so you can see the curves you are selecting
2014-08-06 14:43:40 -05:00
16ca4e0f9a Initial steps towards usable range-based automation editing.
TODO:  needs undo. only works in top quarter of automation lane.  selection model feels weird sometimes.  needs to show gain curve when you are using Range tool
2014-08-05 15:42:06 -05:00
62cab525f0 (Mixbus profile only) tentatively remove the Zoom and Cut tools, to save space in the toolbar and reduce some highly redundant functions 2014-07-14 10:08:55 -05:00
05bca82117 cut ops can start on automation tracks too 2014-07-08 21:36:05 -04:00
542d1ce01c cut ops can start with the mouse pointer not over a region 2014-07-08 20:28:27 -04:00
d97199088b some code shuffling to make sure that cut mode always operates at the mouse location, with (maybe) the right regions 2014-07-07 10:13:26 -04:00
936861f6ce Use Canvas::re_enter() after changing mouse mode so we get the right cursor no matter what item we're over; fix return value for button press in cut mode; never change selection in cut mode 2014-07-07 07:54:41 -04:00
779fe6c082 add functionality for cut tool 2014-07-07 07:05:44 -04:00
7ec397c019 add basics of Cut mouse mode, no functionality yet. Icon images are still required 2014-07-07 07:05:43 -04:00
043b76569d fix the naming and behavior of always-play-range to match the button, which is follow-edits. when you select a range, the playhead should jump to the start of the range and begin to play the selection. BUT (unlike previous implementation) if the user wants to relocate the playhead, then that should be allowed. The user should always remain in charge of the playhead location. NOTE: your previous config setting will be invalidated. You must re-save a session to overwrite with the new config variable 2014-07-03 12:56:33 -05:00
3c2c048f40 reinstate same logic, slightly differently implementedm, for choosing range/object mode when pointer is in smart mode and in a track but not in a region 2014-07-02 16:23:46 -04:00
e5e12acc56 Merge branch 'ripple-mode-cc' into cairocanvas
Fix up merge conflicts in
	gtk2_ardour/editor_mouse.cc
	gtk2_ardour/editor_ops.cc

Also fix up compile errors.
2014-07-01 19:10:47 +01:00
b47c20783d (hopefully) fix smart-mode breakage of xfade operations
We needed to set the selected regionview from a click when clicking on xfade items, but I also removed duplicate logic for some similar items
2014-06-30 19:18:34 -04:00
89f673a7a7 context click over a trim handle is semantically equivalent to a context click on the xfade 2014-06-30 13:58:46 -04:00
a9b3361081 use Editor::effective_mouse_mode() inside Editor::button_selection(); clean up special-case of fade in/out handles and mouse mode 2014-06-30 09:17:03 -04:00
4e689d9496 use new TrackingText for verbose cursor 2014-06-26 15:10:24 -04:00
a3c378cf62 move utility functions into a dedicated namespace 2014-06-25 21:47:54 +02:00
e7895e1f80 more work on cursor tracking state 2014-06-18 21:03:25 -04:00
becf857f48 a whole slew of changes related to centralizing and rationalizing cursor management.
Debugging output left in place to help address the reports that will come in as people test this more
2014-06-18 10:24:59 -04:00
85e2c60673 add back click behaviour for canvas rulers, and also cursor enforcement 2014-06-12 16:06:31 -04:00
92bb0e0d7f fix problem with calls to Editor::trackview_by_y_position() when using motion events. The coordinate passed in was in canvas space and the method expected trackview space
To handle any further issues like this, I generalized and added an optional argument specifying that the canvas=>trackview transform is required, thus
centralizing where this done.
2014-06-08 14:41:29 -04:00
ba8d0e32f7 fix crash caused by click-on-region-name if name highlights are not in use - such a click is not a trim operation under those conditions 2014-06-08 11:26:32 -04:00
2aa32ed349 unify Fade-Handle Cursors 2014-06-05 18:58:21 +02:00
e0533e9dd7 more profound changes to canvas scrolling, in particular find appropriate ScrollGroup for Canvas::{window,canvas}_to_{canvas,window}() 2014-06-03 16:13:12 -04:00
dc349514fa remove utterly useless unused code 2014-06-03 16:11:24 -04:00
da7a860256 remove useless groups from timebar area, clarify scroll group naming in editor 2014-06-03 16:11:24 -04:00
5696199daf remove timebar canvas and just use a single canvas instead. This is just part one - lots of minor fixes to be done 2014-06-03 16:10:27 -04:00
6019f06bdf different approach to independent scrolling, involving ArdourCanvas::ScrollGroup
The idea now is that a scroll group item can be added to the canvas which will causes its children to scroll in either or both
directions (horizontal or vertical). There are few complications: the position() of the ScrollGroup is ambiguous depending
on whether you want it with scroll taken into account or not, so Item::canvas_position() was added, which defaults to
the same value as Item::position() but is overridden by ScrollGroup to return the position independent of scrolling. This
method is used when translating between item/canvas/window coordinate systems.

Note that the basic idea is that we MOVE the scroll group when a scroll happens. This mirrors what happens in the GnomeCanvas,
where Nick Mainsbridge came up with a great idea that allowed unification of the time bar and track canvases.
2014-06-03 16:10:27 -04:00
d6b1a9f6e3 prepare fade+trim cursors (cursor image still missing) 2014-05-31 14:04:41 +02:00