13
0
Commit Graph

645 Commits

Author SHA1 Message Date
4769c387f3
Expose EditorCursor via public editor API
This is in preparation to subscribe to playhead cursor position
changes in the recorder-UI.

This change also clean up the API, replacing a public variable
with a const access method and follows #12 of
https://ardour.org/styleguide.html
2021-01-08 18:39:56 +01:00
e85ae7f9a6
Verbose cursor audio region peak display
https://discourse.ardour.org/t/is-it-possible-to-view-audio-levels-in-db-by-moving-cursor-over-a-waveform/105199
2020-12-30 13:42:42 +01:00
1d33ed5aca MIDI bindings etc. should work while in draw mode, not just internal edit
The only real difference is in what the mouse does, so keys should work the same
2020-05-05 17:58:32 -06:00
575c818482 when a MIDI region has a note selected with none previously, cancel existing MIDI region/note selection 2020-05-01 17:39:13 -06:00
e9e4792a99 only activate MIDI editing bindings if in actual internal edit mode.
Draw mode does not as internal editing for these purposes
2020-04-29 16:27:27 -06:00
65f7a6a938 changes to deal with region/note selection when changing into/out of internal edit mode
Also, activate MIDI editing actions so that they are effective in internal edit mode
2020-04-16 17:48:12 -06:00
3391fa0f51 NOOP: use braces as per style guide 2020-04-16 17:48:12 -06:00
4151ec1907 remove accumulated debug output 2020-03-25 15:12:30 -06:00
dbcd78cf71 more playhead-drag/click locate debugging 2020-03-25 13:18:58 -06:00
04aebc920e more playhead-drag/click locate debugging 2020-03-25 11:23:45 -06:00
3c00048b0c Session::request_locate() takes a tri-valued second argument for "roll-after-locate"
This allows callers to defer logic about auto-play/current rolling state and more to TransportFSM where it
can be cnentralized and is less ambiguous
2020-01-18 08:49:18 -07:00
85485d4832 Allow the Cut tool to appear in Mixbus. 2019-09-29 10:12:00 -05:00
4050ca5633
Update GPL boilerplate and (C)
Copyright-holder and year information is extracted from git log.

git history begins in 2005. So (C) from 1998..2005 is lost. Also some
(C) assignment of commits where the committer didn't use --author.
2019-08-03 15:53:15 +02:00
31815b5f26
NO-OP: whitespace
This fixes mostly <tab> after <space> and similar <tab> not used
for indenting as well as some related code alignment issues.
2019-04-13 17:57:46 +02:00
01a43c6b1e
Another round of whitespace fixes 2019-04-09 00:27:33 +02:00
37aaa2d11b
NO-OP: whitespace, alignment 2019-04-08 22:39:22 +02:00
50303d90bd
NO-OP: whitespace, indent 2019-04-08 20:58:18 +02:00
56047a094c
AutomationRangeDrag tweaks for stacked layer view
Use y-pos and height of given TAV *layer* where the drag was initiated.
2019-03-30 01:19:47 +01:00
d8571e2572
cont'd AutomationRangeDrag updates -- safety commit
This is work in progress towards fixing stacked region's region-gain
and multiple discontinuous regions spanning multiple tracks.

AutomationRangeDrag::setup() still does not collect all AutomationLine
points for certain overlap scenarios. There's more to come...
2019-03-29 15:57:07 +01:00
0eee891de9
NO-OP: remove unused variable 2019-03-29 14:54:15 +01:00
0ee6b03144
Implement multi-region AutomationRange drag/drop 2019-03-27 23:25:28 +01:00
8244026533
Consolidate ToggleAction cast, use new API
Furthermore we can assume that all Actions are registered and
Unregistered actions will ::abort() execution.
2019-02-28 23:54:42 +01:00
29db406512
Fix crash when pressing "Esc" without a session
Ardour's UI can process a key-binding or emit the Escape() signal
without a loaded session or when unloading a session.
2019-02-26 20:08:56 +01:00
fc83d044f8 use ActionManager namespace, rather than ActionMap objects, and remove all per-context action maps 2018-12-10 08:34:01 -05:00
9ba09caa9b Likely fix for jittery snapped-cursor when dragging a region. 2018-08-10 10:43:57 -05:00
0883f02de9 new_grid: The Return of the snap_to_X functions.
We no longer assume that Snap always uses the visible ruler lines.
 If you want to snap to the grid, and ignore the users zoom scale, use SnapPref::SnapToGrid_Unscaled
 This fixes 2 (known) oversights: "snap region(s) to grid" and "regions whose start are left of the canvas edge".
2018-07-27 00:28:47 +02:00
0d32105a1e new_grid: Add options for rulers_follow_grid and grid_follows_internal 2018-07-27 00:26:09 +02:00
ceac42cc03 NO-OP: whitespace
- remove trailing whitespace
- remove space after opening brackets and before closing brackets
- add space around operators
- do not use '//' for multi-line comments, do not use "//" on line-start
  to comment-out code breaking indenting (-Wmisleading-indent)
- do add a single space after comment-start /*{SPACE}... or //{SPACE}...
- reserve duplicate whitespace "  " for alignment, remove other duplicate
  whitespace
- use established "TODO" and "XXX" (highlighted keywords)
- remove equal-sign series "====" (those indicate merge conflicts)
2018-02-24 13:55:20 +01:00
f54f270627 Fix a few warnings 2018-02-17 09:12:38 -06:00
0299229e41 SoloSelection: gui part. 2018-02-11 09:39:45 -06:00
dc61256466 new_grid: Rewrite of Snap and Grid. (squashed commit)
Separate Snap from Grid.  Lots of naming changes.
Multiple simultaneous snap options allowed. Grid is one of the possible Snap options.
Grid uses the same data as the rulers.  Replace complicated tempo_lines with simple grid_lines.
The Grid is zoom-scale-sensitive along with the rulers.  If you are zoomed out, grid becomes coarser.
2018-02-09 09:59:39 -06:00
c6eab71435 new_snap: Snapped Cursor ( squashed commit )
Snapped Cursor is a line that follows the edit point, and indicates where the operation will occur.
This replaces and extends the line that appears with the Cut tool.
New associated preferences:  snap_threshold and show_snap_cursor.
2018-02-09 08:21:45 -06:00
30b087ab3d globally change all use of "frame" to refer to audio into "sample".
Generated by tools/f2s. Some hand-editing will be required in a few places to fix up comments related to timecode
and video in order to keep the legible
2017-09-18 12:39:17 -04:00
f9e7ffc601 no more per-track varispeed 2017-09-18 11:40:53 -04:00
nick_m
0d9c4986e9 Only add a new tempo or meter on click if the primary modifier is pressed
Being able to add with any modifier can confuse a user who expected
a tempo-altering drag.
2017-07-22 02:15:20 +10:00
nick_m
e82e30992d Remove double-nested reversible command when note editing 2017-07-22 02:15:20 +10:00
1f5ebc5485 Remove ArdourPrompter wrapper 2017-07-17 21:06:04 +02:00
Thomas Brand
63ea7b6516 NO-OP whitespace (updated GH PR #357) 2017-07-01 19:28:26 +02:00
dc0139d4af use CoreSelection for track selection 2017-05-05 18:56:25 +01:00
nick_m
f8a6f8918d back to using shift-ctrl for pinch drag. set colours of affected curves. 2017-02-27 20:16:10 +01:00
nick_m
8e944953c6 highlight the tempo curve that is to be altered, modify text to suit. 2017-02-27 20:16:10 +01:00
nick_m
211226983d remove tempo end drag (the control drag on the curve). a;ter tempo marker drag.
- holding down shift before initiating a tempo mark drag
	  alters the end tempo of the previous one as before, but
	  this is now a separate drag.
	- restore vertical dragging of the tempo mark to alter start/
	  end tempo. shift during the makrker drag alters start tempo.
	  xontrol + shift during the drag alters end tempo.
2017-02-27 20:16:10 +01:00
nick_m
ccb51a8ddb rework tempo editing.
most changes are due to a new design where tempo discontinuities at the
beginning of a ramped section may be set.
this allows easier mapping of live performance, especially in
the common case of a ramped ritard before the beginning of a new section.

feature summary:

holding constraint modifier (shift) while dragging the BBT ruler area
drags the tempo lines by changing the start tempo (as before)

holding copy modifier (control) while dragging the BBT ruler area
drags the tempo lines by changing the end tempo (ahem. not quite there)

dragging a tempo mark while holding constraint (shift) will change the
previous end tempo to match the marker position *worth trying*.

holding constraint and copy modifier (control + shift) while dragging
the BBT ruler area attempts to'pinch' or twist the surrounding tempi
sp that later ones are not repositioned (currently suffereng from
rounding errors)
2017-02-27 20:16:10 +01:00
nick_m
59daffea1d rework snap
snap now fills in a struct (MusicFrame) which contins a snapped frame
along with a music divisor.
this gives useful information wrt magnetic snap which may or may not
have rounded to an exact musical position.

region position may now be set musically (using quarter notes for now).

this patch fixes several problems in the current code:

	- dragging a list of music-locked regions now maintains correct
	  musical offsets within the list.

	- splitting regions using magnetic snap works correctly (#7192)

	- cut drag should now work correctly with magnetic snap.

	- musical length of split midi regions is no longer frame based.
2017-02-04 22:57:36 +11:00
1587364f8d avoid locate when clicking in region fade handles in smart mode+follow edits 2017-01-10 09:53:28 +00:00
628c99d555 Follow Edits => Follow Range
* "Follow Edits" button had several behaviors that confused users.
* "Follow Range" only has 2 behaviors:
** Click anywhere in Range mode (or Smart mode) to locate the playhead.
** When you select a Range, "Play" will play the selected range.
2016-12-19 13:14:44 -06:00
b34a614df4 Further fixes to non-cxx11 enabled builds
Hopefully all that is necessary this time
2016-12-13 17:10:30 +10:00
0eff7d4a0c Add option to Zoom to Selection on double click
Currently implemented for Region and Range selections.

The new option is false/off by default to maintain existing behaviour. I'm not
sure it should require another option, perhaps Zoom to Selection should be the
default and accessing the region properties dialog can be via Modifier+double
click, but further changes can be made on user feedback etc.

Related: #7112
2016-12-13 13:02:04 +10:00
nick_m
522264f5d6 clicking on an automation line selects adjacent points correctly. 2016-11-23 15:09:54 +11:00
73fe0e4b97 use moved version of reset_focus() 2016-09-06 16:56:51 -04:00
nick_m
c1b950373f Amend last commit - remove some code. 2016-08-20 05:41:12 +10:00
nick_m
869a9cb5df Swap tempo/meter colours when hovering. Use entered marker for these as well.
- Note : entered_marker modifies the 'p' press, locating to the
	  currently hovered-over marker.
2016-08-20 04:36:52 +10:00
nick_m
4eba9b8638 Resolve potential ambiguity between the constraint modifier and the copy modifier when beginning a drag. 2016-08-14 03:04:54 +10:00
cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
nick_m
a44c8b96ae Edit note dialog fixes.
- position display is session-relative

	- Add missing undo to note edit.
2016-07-10 02:18:38 +10:00
nick_m
94e0a15325 Exact beat - provide audio->music mapping for region split.
- for those not in the know, this series provides a way to
	  remove the temporal distortion introduced when using an
	  audio frame-based gui for music-locked objects.

	  In short, the gui uses an audio frame representation to move
	  objects. It displays the object using frame_at_beat(), quantizing
	  the time value to audio frames. This is fine until the user selects
	  that frame but expects it to be interpreted as a beat.
	  Thus beat_at_frame() would not produce the user-expected beat
	  (temporal quantization error of up to 0.5 audio samples).
	  This is one method of mapping audio time to music time accurately.
2016-07-10 02:18:36 +10:00
6baac7d46f various safety checks for the result of dynamic_cast-ing a TimeAxisView to RouteTimeAxisView
Now that we have VCATimeAxisView, this needed to be done, but it also potentially applied with automation
2016-06-02 08:42:58 -04:00
nick_m
5d3467d768 Allow user to have the snap modifier pressed when using the constraint modifier to initiate a bbt ruler drah. 2016-05-28 04:34:10 +10:00
nick_m
86b0268e8b Tempo ramps - add visualtempo curve, dragging bbt or music rulers with constraint modifier dilates previous tempo. 2016-05-27 23:38:16 +10:00
nick_m
e0607ca913 Tempo ramps - add gui dilation of tempos.
- a meter can be dragged using the constraint modifier, which
	  sets the previous tempo accordingly.
	  This could be added to the bbt ruler to allow direct dragging
	  of beats and bars, but the exact behavior of that is still
	  undecided. comments?

	- also preliminary work on the necessary tempos locked to
	  audio-locked meters.
2016-05-27 23:38:15 +10:00
nick_m
69b6379b23 Tempo ramps - pressing constraint modifier keys during tempo drag changes tempo with vertical movement, incorporating beat constraint (if present).
- makes it easy to find suitable accelerandos for hit points in conjunction
	  with playhead position, beat-locked tempos and initial meter frame.
2016-05-27 23:38:12 +10:00
9a11e3a64d change API for CairoWidget::focus_handler
This functor/closure is responsible for stealing focus from any existing text entry (or whatever else may have focus)
when clicking on a CairoWidget or derived class.

The old implementation just gave focus back to the editor canvas. The new version walks up the widget packing
heirarchy to find a focusable parent (from the CairoWidget for which it is invoked). If no focusable parent
is found, it cancels keyboard focus in the toplevel window containing the CairoWidget
2016-03-15 12:41:21 -04:00
d5bcf90b1a remove all tearoffs except the monitor section.
We don't need this functionality anymore as we build on 15 years experience plus the new tabbed structure
2016-02-22 15:31:23 -05:00
084af96bf4 Change handling of Midi note selection to eliminate signal emission/delays.
Each MidiRegionView(MRV) is connected to the Selection::ClearMidiNoteSelection
signal that is used to notify the all MRV instances to clear their note
selection.

The MRV class also has a private static SelectionCleared signal that is used to
signal other MRV instances when their selection has been cleared. When the
Selection::ClearMidiNoteSelection signal is emitted it causes each MRV to also
emit the SelectionCleared signal. So the emission takes quadratic time.

With 1500 MRV instances emission takes about 2.2 seconds on my machine, and
some operations like track selection cause it to be emitted 3 times(another
issue).

The Selection class in the Editor knows which MRV instances have note
selections, as it is notified by MidiRegionView whenever the selection count
becomes zero or becomes non-zero. Clearing the Note selection should then just
be O(N) and direct calls can be used rather than signals.

This change removes both the signals and uses the existing references between
Selection and MRV class to control note selection. There should be no
behavioural changes in Midi note selection with this change.
2016-01-14 20:41:44 +10:00
nick_m
336f8d47fe Clarify context menu for midi notes.
- right click on a note selects it if unselected or selection empty.

	- note_context_menu is shown as described in #6348
2015-11-01 05:22:55 +11:00
nick_m
3e63439637 "End" -> "end" in end point trim command name. 2015-10-30 23:43:09 +11:00
nick_m
be1396d066 Select the control point about to be deleted when using shift + right click.
- fixes incorrect selection changes when doing this.
2015-10-20 00:53:29 +11:00
nick_m
52a239a254 Allow adding / toggling rubber band selection of automation control points. 2015-10-20 00:53:29 +11:00
nick_m
58068b4e85 Show verbose cursor control point values in MouseContent mode as well. 2015-10-20 00:53:29 +11:00
nick_m
1451d8043a Region gain point selection behaves as per track automation. 2015-10-20 00:53:28 +11:00
nick_m
17294ab9ec Make control point selection more consistent.
- disallow simultaneous events via ControlList::editor_add ()
	- clicking on an automation line selects the points that define it.
	- don't 'flash' a region selection when using mousedraw mode.
	- cp click selection resembles region selection.
	- region gain points respect snap modifier (a la automation points).
2015-10-20 00:53:27 +11:00
f307080808 disable follow-edits with external sync #6577 2015-10-18 02:03:41 +02:00
22b07e0233 NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
4dc63966f0 globally remove all trailing whitespace from ardour code base.
Paul Davis was responsible for introducing almost all of this.
2015-10-04 14:51:05 -04:00
38bae2996a Remove ardour_ui.h header inclusion 2015-09-16 16:55:17 -04:00
6b019a4953 Move UIConfiguration Singleton into UIConfiguration header
This removes the direct dependence on ardour_ui.h from 39 files
2015-09-16 16:55:17 -04:00
07dc805919 Fix bug #6337, clicking in canvas without session loaded causes crash 2015-08-14 16:04:24 +10:00
e1f168de11 rename Marker class
Classes are in the global namespace.
OSX has a flat namespace and OSX32bit/Carbon has a Marker too.
2015-07-23 17:58:40 +02:00
nick_m
63269b3063 Automation selection fixes.
- display selected comtrol points in region gain lines
	- display selected points in internal edit mode
	- allow dragging of region gain lines in MouseContent mode
2015-06-21 05:27:45 +10:00
nick_m
639750f815 Don't add history by clicking a control point, fix control point selection.
- also make set_selected_control_point_from_click () return
	  something useful.
2015-06-18 03:48:39 +10:00
nick_m
4c1d79af4a Unbreak region brush drag wrt undo, avoid some dangling commands in the gui
- also allow moving of automation lines in internal mouse mode.
	- this is also a first pass at ensuring that if an operation does
	  nothing, avoid an undo entry.
2015-06-17 09:54:22 +10:00
cc396baf0d Fix some visual loopholes when switching tools inside a region:
switching to Grab should show the fade handles...
...switching away from grab should hide them.
Also, change "always show gain" preference to show lines, but not control points.
2015-06-01 13:12:39 -05:00
nick_m
1580c6d635 Fix some strings incorrectly marked for translation.
My apologies to translators.
2015-03-25 23:31:23 +11:00
f39d450640 fix very unlikely null pointer dereference. 2015-03-17 17:01:50 +01:00
nick_m
88e5fccbf1 Don't set the following dialogs to be transients for the editor:
Control point dialog
Edit note dialog
Both types of tempo dialog
Both types of meter dialog.
2015-03-14 03:52:03 +11:00
927f5521ce ContentEdit drag on empty MIDI track should not create new midi regions 2015-02-05 12:24:11 -06:00
0f46d7b107 ignore context menu click events, notably during drag but also for a couple of other purposes
Conflicts:
	gtk2_ardour/editor_canvas_events.cc
2015-01-26 16:39:22 -05:00
nick_m
d312bf1d7a Fix some ignored region selection changes (probably others).
Fix ignored right click track selection change.
2015-01-18 05:25:23 +11:00
nick_m
18c502f646 Reduce selection loss when changing mouse modes.
Never change selection when smart mode toggled.
2015-01-15 01:39:00 +11:00
nick_m
44f2f53cde A test for less brutall deselection on mouse mode change.
Mostly stops toggling smart mode from doing anything to the selection.
2015-01-15 00:06:16 +11:00
e1f8112f81 toggling smart mode is just an option.
it should not force mouse-mode to Object
it should not clear the current object selection
2015-01-14 06:30:16 -06:00
59bb3fbe65 Remove drag code from automation region view.
Let the editor handle it like (almost) everything else.
2015-01-13 23:53:28 -05:00
d39d4c1c11 Fix automation range drag and implement for MIDI.
Range select rect sticks around now after switching to the draw tool, but
disappears if a note selection is made.  Not sure if draw is really the most
appropriate tool here (particularly if we ever implement actual pencil-like
drawing); edit contents seems more appropriate but that would probably cause
more selection issues, so here we are.
2015-01-13 23:30:37 -05:00
88e6995b14 when the mouse tool changes, smart mode should have no effect on clearing selections 2015-01-13 13:33:57 -06:00
nick_m
44203ce955 Fix AutomationTrackItem rubberband click thinking it was unhandled.
Fix several other cases where a single mouse click could cause several
(not nested) selection ops.
Fix missing selection memento for midi notes and midi commands.
Rename some variables.
Fix random style issues.
2015-01-11 04:07:31 +11:00
nick_m
a795892492 Separate selection operations into their own temporary history mechanism.
The user can now replay *all* earlier selection operations until the next
session undo/redo command, or the completion of a new operation.
Nothing relating to selection ops is stored, and selection operation history
is begun on first idle.

Selection operation history is fundamentally different from the history of
operations which act on a selection in terms of both their viewport and the
amount of information required to replay them.
WRT undo, the user of a selection op doesn't care about the viewport state
at the beginning of an op, but rather that at the end of the previous one.
2015-01-02 08:01:12 -05:00
486d47db0e Fix smart mode cursor on audio regions. 2014-12-30 12:50:15 -05:00
31641179f9 Fix potential pop of empty enter stack. 2014-12-28 16:06:44 -05:00
12a7f12b0b Context menu for applying edits to note selection. 2014-12-25 15:32:10 -05:00
fb5ea0ca92 Fix sticky snap mode/type selectors. 2014-12-24 15:11:25 -05:00
62355de33a Fix cursor update on nested entry.
For example, if you're in a note and something about the mode changes, it's the
underlying region context that needs to change.  So, seems we need a stack of
entry contexts to deal with this sort of thing.

Switching in/out of smart mode still doesn't update immediately because we
don't have the y-coordinate needed to update it.
2014-12-23 13:47:59 -05:00
64fa63212f move all (G)UI related configuration parameters into UIConfiguration, not RCConfiguration 2014-12-22 13:39:46 -05:00
David Robillard
670938c8c4 Fix various cursor problems.
Add a new scoped cursor system that makes it much harder to screw up and end up
with stick cursors and so on.
2014-12-20 01:13:25 -05:00
341146a975 Remove mouse mode toggling. 2014-12-18 20:26:43 -05:00
66870ddf09 Restore snap when switching to/from internal. 2014-12-18 20:23:34 -05:00
7ab8a11fb5 Enforce internal/external selection exclusivity. 2014-12-18 20:22:48 -05:00
cebf191cba Make tools toggle-like by switching to last mode. 2014-12-18 20:21:05 -05:00
5fef655380 Remove internal edit mode and add "content" tool. 2014-12-18 20:21:01 -05:00
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