13
0
Commit Graph

737 Commits

Author SHA1 Message Date
nick_m
3059adea7b Tempo ramps - fix for dragging audio-locked meters over no time. 2016-05-27 23:38:14 +10:00
nick_m
96cf262c23 Tempo ramps - meters can be dragged across each other.
- also removes some fairly silly code,
2016-05-27 23:38:14 +10:00
nick_m
3048758369 Tempo ramps - copy-drag meters works again.
- meter drags now use mvc style.
2016-05-27 23:38:13 +10:00
nick_m
3d07cd79e1 Tempo ramps - api change, remove some code. 2016-05-27 23:38:13 +10:00
nick_m
b5021eb7f3 Tempo spamr - smallify some code. 2016-05-27 23:38:13 +10:00
nick_m
5d37fc6e36 Tempo ramps - more multi audio-locked meter work, code reorganisation. 2016-05-27 23:38:13 +10:00
nick_m
b39db7ebeb Tempo ramps - a saner way to snap music-locked tempos. 2016-05-27 23:38:13 +10:00
nick_m
6b7dd59b7a Tempo ramps - fix incorrect verbose cursor during tempo drag. 2016-05-27 23:38:13 +10:00
nick_m
a9714de9b9 Tempo ramps - tempo drags respect the snap modifier. add some documentation. 2016-05-27 23:38:13 +10:00
nick_m
354567e5a7 Tempo ramps - switch MusicLocked tempos to beat-based dragging. fix various bugs wrt future-snapped tempo drags 2016-05-27 23:38:12 +10:00
nick_m
daa07ce6e0 Tempo ramps - tempos now musically snap to their future. 2016-05-27 23:38:12 +10:00
nick_m
cb43d485fa Tempo ramps - another approach to first meter/tempo.
- first tempo is glued to first meter position as they are now
	  both locked to AudioTime.
	- all existing audio-locked tempos to the left of the first meter
	  are made inactive. all to the right are made active.
2016-05-27 23:38:12 +10:00
nick_m
4de28f0745 Tempo ramps - fix just-introduced undo crash. 2016-05-27 23:38:12 +10:00
nick_m
a64e46a6b3 Tempo ramps - allow constraint-drag of first tempo. 2016-05-27 23:38:12 +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
nick_m
3c2ad63de7 Tempo ramps - complete 'music locked meters are now positioned using beats' transition. 2016-05-27 23:38:12 +10:00
nick_m
99efddb050 Tempo ramps - various bug fixes (meter drag undo, incorrect copy) 2016-05-27 23:38:12 +10:00
nick_m
58d4889ad3 Tempo ramps - music-locked meters now use beats rather than pulses as their reference.
- fixes many problems with a non-zero audio-locked first meter.
2016-05-27 23:38:12 +10:00
nick_m
b47bb55226 Tempo ramps - improve music-locked meter drags, improve dump().
- dump now shows cross-calculation of tempo positions.
2016-05-27 23:38:11 +10:00
nick_m
b415b59f79 Tempo ramps - respect tempo note type and meter note divisor correctly.
- tempo and meter position is now pulse-based,
	  although meter still has a beat for convenience.
2016-05-27 23:38:11 +10:00
nick_m
ec791c8dd4 Tempo ramps - hook up tempo display, a new approach to audio-locked meters
- audio locked meters define an offset which is used for all public
	  TempoMap methods while the internal map remains contiguous.
	  Probably a few unexpected consequences here, but seems to work mostly.
2016-05-27 23:38:11 +10:00
nick_m
278ad73259 Tempo ramps - check for impossible locations tempo dialog bbt entry. reorganise code. 2016-05-27 23:38:11 +10:00
nick_m
36ec551a8a Tempo ramps - fix music-locked meter drags. 2016-05-27 23:38:11 +10:00
nick_m
a0558694df Tempo ramps - audio-locked meters have a bbt of 1|1|0
- possibly lots going wrong with this due to multiple occurences
	  of 1|1|0.
2016-05-27 23:38:11 +10:00
nick_m
6ecef52d76 Tempo ramps - meter sections drag again. 2016-05-27 23:38:11 +10:00
nick_m
989089a4e9 Tempo ramps - add method to handle beat-based tempo reordering. clean code. 2016-05-27 23:38:11 +10:00
nick_m
452e484faf Tempo ramps - rework mouse dragging of tempo marks, derive beat_at_tempo() and tempo_at_beat(). 2016-05-27 23:38:11 +10:00
nick_m
bc42dea451 Tempo ramps - first stab at metric marks locked to frames or beats.
- pretty much untested.
2016-05-27 23:38:10 +10:00
nick_m
28127b1768 Tempo ramps - Remove the tick walk, store c_func, document the approach. 2016-05-27 23:38:10 +10:00
nick_m
87d49cd6ec Tempo ramps - api rename, fix various meter and tempo dialog bugs. 2016-05-27 23:38:10 +10:00
nick_m
5c6e18e6a0 Tempo ramps - remove the concept of bars from tempo sections.
- this helps where tempo and meter have a somewhat circular
	  dependency.

MetricSection now has a musical position expressed in beats (a double).
MeterSection still has a bbt, but it really isn't needed as we have
enough information to discover the number of bars at a given beat without it.
TempoSection now has a hack to enable loading of legacy sessions, which will
ultimately be a lot cleaner than the current code.

Removing bars from tempo sections also allows us to place them
at arbitrary frames (implemented here).
2016-05-27 23:38:09 +10:00
nick_m
340bd42c62 Tempo ramps - allow live updating of tempo markers.
- all a bit slow, but should be ok once we can lock
	  markers to frames.
2016-05-27 23:38:09 +10:00
nick_m
dbfe991cd8 Tempo ramps - fix changing from const to ramp in the gui.
- also fixes some midi mouse over problems
	- start using replacements for frames_per_bar() frames_per_beat() etc.
2016-05-27 23:38:09 +10:00
nick_m
7fc3b0c34c Initial stab at tempo ramps.
Replaces the list of points in TempoMap with TempoSection functions, which
compute tempo-at or tick-at time relative to tempo section start.
TempoMap consults them additively to determine things like bbt_time(),
frame_time() get_grid() etc.
This has a marked effect on scrolling speed along with the code simplification
in the places it has been attempted.

Several things are broken here.
Currently every ramp except the last one is an exponential ramp. this may
be simple to fix :).
Mouse-over midi grid doesn't match mouse click grid. should also be simple.

Many things seem to work, but their accuracy should be in question until
each area has been addressed.
2016-05-27 23:38:09 +10:00
ff9bb1886a single click in timefx mode should still show dialog, allow user to set parameters 2016-02-22 15:31:26 -05:00
84de4246bb correct fix previous merge conflict 2016-02-22 15:31:23 -05:00
16731d07d3 remove use of current_toplevel() where unnecessary, fix broken necessary cases, generally fix up show/hide/attach/detach for Tabbables 2016-02-22 15:31:22 -05:00
9010262bed first compilable version of tabbable design.
I would have loved to split this apart, but there are just so many interrelated changes,
it makes little sense and would be a huge effort that would break future git bisect
use because so many intermediate commits would not compile
2016-02-22 15:31:21 -05:00
Adrian Knoth
6fa88273aa Spelling correction patch from Debian
Patch taken (and forward-ported to HEAD) from
<https://anonscm.debian.org/cgit/pkg-multimedia/ardour.git/plain/debian/patches/0100-fix-typos.patch>
2016-02-22 15:13:01 -05:00
90e35c7143 Fix bug #6762, MIDNAM note read outs don't work when dragging MIDI note
Also fixes it so the key is selected in the piano roll header
2016-02-11 08:17:18 +10:00
f315c0910d Fix bug 6735, Take into account snap to when stretching regions in Editor 2016-01-21 14:07:49 +10:00
nick_m
4bb5278b62 Drag - Don't snap _last_pointer_frame when leaving autoscroll. 2015-12-08 04:34:28 +11:00
nick_m
6bd842e301 Use correct position when finishing tempo and meter marker drags. 2015-12-08 04:31:59 +11:00
nick_m
c4203f848e Don't snap twice when moving regions. 2015-12-08 03:36:53 +11:00
9694dfc8d2 Fix bug #6506, crash when moving tempo markers with automation on midi tracks 2015-11-16 09:57:04 +10:00
nick_m
024adf3a4d Fix #6673 - another prematurely closed undo transaction.
- add_midi_region used to commit, resulting in
	  _region->set_position() adding a command when there was
	  no current transaction. The sub-bug here was that repeatedly
	  calling set_position() on the new region resulted in nonsensical
	  automation movement after the drag.
2015-11-14 03:14:23 +11:00
nick_m
d5c4d068b0 Fix snap modifiers not working on notes when grid is set to off. 2015-10-31 06:02:54 +11:00
nick_m
5e7c7e52bd Use automation line's frame of reference for y position.
- removes the need for 'pixel hunting' wrt NAME_HIGHLIGHT_SIZE.
	- new control points generated by clicking on a line are placed
	  where the verbose canvas cursor says they are.
2015-10-30 21:14:16 +11:00
nick_m
6d98ccf901 Dont do duplocate calls to MidiRegionView::trim_front_ending () in TrimDrag.
- fixes #6658
	- also leaves undo history alone if point trim does nothing.
2015-10-30 04:01:44 +11:00
nick_m
73328172d6 Fix reversed ratio in last commit. 2015-10-30 00:01:33 +11:00
nick_m
36dd7f8d9d Start line drag using canvas y coords.
- fixes #5759
2015-10-29 23:37:01 +11:00
nick_m
61729f8e68 LineDrag fixes wrt initial drag position and display of y value. 2015-10-28 05:33:43 +11:00
nick_m
fc8b03eef5 Fix incorrectly placed control points (y-axis). fixes #6647.
- also use the return from AutomationLine::drag_motion () in
	  anticipation of it correctly reporting its clamping to
	  AutomationRangeDrag.
2015-10-28 02:46:03 +11:00
nick_m
e78a44d4e5 Markers use the selection change stack. 2015-10-25 05:26:44 +11:00
nick_m
90aec831cb Relative snap for markers.
- also removes many uninitialised variable warnings in
	  editor_drag.cc found by cppcheck.
2015-10-24 04:59:57 +11:00
nick_m
c9864b71a0 ResizeNoteDrag selection click behaves as NoteDrag's does. 2015-10-24 01:19:00 +11:00
nick_m
96524d863b Clear point selection when uniquely selecting a note.
- Also fix selection undo when creating notes w/control
	  in MouseContent mode.
2015-10-24 00:07:03 +11:00
nick_m
d295fe12e4 Click on a selected note unique selects it (as per regions, control points). 2015-10-20 00:53:30 +11:00
nick_m
986a3a9775 Don't snap if fine adjust modifier used.
- permits non-alt modifier for fine adjust.
2015-10-20 00:53:29 +11:00
nick_m
6fe6f95d04 Fix for fine adjust overriding snap modifiers. 2015-10-20 00:53:29 +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
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
c315c6f140 Allow to override A/V-lock (when moving audio) 2015-09-08 02:51:58 +02:00
88f532ed6a Allow to override A/V-lock (when moving video) 2015-09-08 01:35:35 +02:00
f1fab06862 fix midi note de-select #6534 2015-08-28 02:25:48 +02:00
nick_m
1963c3ff10 Allow creation of region gain points by clicking on a line.
- Also fixes new AutomationLine points having huge offsets
	  on creation via line click (window vs canvas event sample).
2015-08-27 02:20:43 +10:00
aa3eb11fb3 fix typo in prev commit 2015-08-20 02:27:24 +02:00
89b0817f83 fix "locked" + "locked to video" bug.
previously if some audio region was locked and locked to video,
the audio-region always stayed put and the video could only be
moved forward.

TODO: add an "unlock all" option.
2015-08-20 02:24:27 +02:00
bb79071038 Fix undo/redo when changing fade out length
This may fix bug #6518 or there may be more issues to be found
2015-08-19 13:56:12 +10:00
07dc805919 Fix bug #6337, clicking in canvas without session loaded causes crash 2015-08-14 16:04:24 +10:00
7a3b6e6d08 remove more cruft (dead assignments) 2015-08-07 21:16:14 +02: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
46c8369328 merge fix 2015-07-16 16:13:24 -05:00
7592b5d3e1 correctly track range selection trim and drag creation w.r.t playback priority 2015-06-29 14:18:13 -04:00
nick_m
1768e9817e Fix another LineDrag click crash. 2015-06-19 03:39:51 +10:00
nick_m
dcd3e3823c Don't begin command on start_grab for AutomationRangeDrag and NoteResizeDrag
- fixes a crash when clicking to resize without movement.
	- minor readability fix for _drag_had_movement
2015-06-19 00:02:09 +10:00
nick_m
16109ebcc8 Rework last commit, clicking on an automation line no longer adds history.
- fixes a crash when clicking on automation lines repeatedly.
2015-06-18 06:27:37 +10:00
nick_m
0280989276 Single control points can now be dragged up and down properly.
- preserves the zero notch, but doesn't mess up the cumulative drag.
2015-06-18 04:42:30 +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
44790ebff0 More _reversible_command() auditing in the gui.
- try to keep begin/commit pairs in the same file where possible.
2015-06-17 09:54:23 +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
nick_m
15819f0896 Automation -use editor_add in gui, record straight lines with fewer points.
- don't keep setting/unsetting write pass when transport frame
	  remains the same (think larger jack buffer sizes)
	- insert guards are now 64 frames after when.
	- refactor previous approach.
2015-06-17 09:54:22 +10:00
nick_m
392f48709c Magnetic snap now works on note moves / resizes. 2015-06-11 02:20:37 +10:00
nick_m
b3a4c88e0e Make absolute snap the default snap.
- also fixes a couple of absolute snap bugs wrt midi notes.
2015-06-11 01:36:34 +10:00
nick_m
39d4bbf5e1 Clarify the convention on modifiers and drags. 2015-05-23 23:19:00 +10:00
nick_m
406bcb4dfe Proper initialisation of _x/y_constrained. 2015-05-23 22:59:19 +10:00
nick_m
ea8b5a970f Bring back contrained drag modifier with preference setting.
- this should work as before, but when applied to a button 1 drag,
	  the constraint is in the first direction travelled.
2015-05-23 05:36:03 +10:00
nick_m
88477ace25 Fix inverted logic of SnapOff with snap modifiers pressed.
- also clean up, rename and comment some previous hanges.
2015-05-23 03:09:48 +10:00
nick_m
784abd03e0 Make note drags and resizes obey the disable sanp modifier. 2015-05-22 06:54:16 +10:00
nick_m
37ee083931 Small cleanup 2015-05-22 04:48:34 +10:00
nick_m
65e06fa350 More cleanup
- remove "no_magnets" ugh.
2015-05-22 04:26:16 +10:00
nick_m
7edf0e17bc Clean up a bit - should be a no-op 2015-05-22 03:09:29 +10:00
nick_m
eaf49f02ff Fix up modifier behaviour
- its now possible to use snap modifiers in combination with others
	  afaict this hasn't worked for some time.

	- use "contains" rather than "equals" during drag. Still uncertain
	   about this wrt beginning a drag. for now they are all "equals".

	- probably solve the "snap modifier modifier" problem using
	  ArdourKeyboard::indicates_snap () and friend.
2015-05-22 02:12:58 +10:00
nick_m
186736043c Move ui-centric modifiers into ArdourKeyboard, set some bad defaults.
- Also makes "Mod4" Appear as "Windows" and adds new combination
	"Alt-Windows" to the dropdown.
	- Attempt to set a pair of default snap modifiers (without
	knowing what it actually is for OSX)
	- Copy modifier now saves
	- Snap modifier modifier problem still remains.
2015-05-21 05:32:23 +10:00
nick_m
ae0759ae88 Allow all drag -related modifiers to be set, re-instate "jump after trim"
- Copy modifier still doesn't save
	- Testers please edit the Extra section of ~/.ardourN/config to allow
	defaults to "take"
	- Note that the current defaults overlap.
	- warning - absolute snap modifier has no default and will be always
	"on" unless you set it!
2015-05-21 01:30:57 +10:00
nick_m
66221d1dea Add more modifier preferences.
Note that no defaults are set - go to prefs->user interaction to
	ensure that nothing is set to "no modifer"

	also - the copy modifier doesn't actually save its state yet.
2015-05-20 04:00:04 +10:00
nick_m
dc50730059 Revert to old Lock mode (still called Lock).
Also make midi notes obey the snap delta modifire
2015-05-19 03:27:50 +10:00
nick_m
aac167a19f "Lock" mode is now "Constrained", make snap absolute modifier configurable.
- user can abs/rel modifier key in prefs->user interaction
	  suggested for linux - absolute->alt ignore snap->alt-shift
	- Constrained mode works the same as button 2 drag (initial move
	  sets constraint axis).
2015-05-18 06:25:36 +10:00
nick_m
799e619690 Relative snap now always on - disabled with Tertiary modifier (shift) 2015-05-18 03:15:22 +10:00
nick_m
a0bd6975d2 Clean up drag modifiers.
Button 2 drag now is constrained to initial move axis, removing
	all modifiers from this op.
	Remove Jump after trim mode.
	TrimDrag now has:
		Primary for trim anchored to fade.
		Secondary for contents trim (as before)
		Primary & Tertiary for "non overlap" trim
	All drags have Tertiary for relative snap
2015-05-18 01:43:44 +10:00
nick_m
c359f881a1 Relative Snap -make it activated by the tertiary modifier during drag.
Disabled/enabled with the shift key. no config stuff at all now.
	Move existing (strange) trim feature to primary + tertiary modifiers.
2015-05-17 23:47:01 +10:00
nick_m
91a34c596d Relative snap - support magnetic mode (hackishly for now) 2015-05-17 04:26:05 +10:00
nick_m
bbafb8f137 Cleanup relative snap code. 2015-05-17 00:23:25 +10:00
nick_m
6831d8a5aa Fix typo. 2015-05-16 06:10:02 +10:00
nick_m
c8303c8b7e Revert incorrect region_length() definition. 2015-05-16 04:50:37 +10:00
nick_m
68a8330afc Relative snap 2015-05-16 04:15:52 +10:00
0acdb8b74a remove a dead variable initialization. 2015-03-29 15:23:27 +02:00
57e227fd52 it would have been too much of a good thing. 2015-03-27 20:58:41 +01:00
9242ca7a64 dropzone: honor AutoConnectMaster. 2015-03-27 19:22:21 +01:00
1fffbb554f fix some DnD thinko & edgecases.
* Handle large (delta > 1) movements into the DZ
which are not due to invalid-drop positions, but
caused by laggy GUI or rapid user movements.

* ignore busses when moving out of the DZ.
2015-03-27 16:23:01 +01:00
a1258750ce fix a few -Wsign-compare 2015-03-27 00:50:27 +01:00
70e739b29a Another DnD fix. fix move onto (but not over) busses. 2015-03-27 00:37:47 +01:00
1dfee48139 Heuraka! Nightmarish rework of DnD code.
Allow to drag multiple regions from different tracks
to/from the dropzone.

Busses & Automation-lanes are ignored, as are
hidden tracks.

Any region may serve as mouse drag anchor.

fixes #6172 and #6176
2015-03-26 23:33:13 +01:00
502361c001 DnD: query mouse y-pos only once. 2015-03-26 23:30:18 +01:00
a53bd72697 remove crufty variable 2015-03-25 17:21:13 -05:00
7b1d21128b fix dropzone region ordering 2015-03-25 22:06:05 +01:00
3c55eb1e39 DnD, only use track relationship
Ignore any routes or automation lanes during
region y-axis distance calculation.
2015-03-25 17:15:32 +01:00
a9b2f97395 jot down some thoughts about drop-zone dragging. 2015-03-25 15:57:16 +01:00
b90c38639a fix drags crossing automation lanes. 2015-03-25 14:43:11 +01:00
nick_m
1580c6d635 Fix some strings incorrectly marked for translation.
My apologies to translators.
2015-03-25 23:31:23 +11:00
f851a0bf3a two more drop zone checks
see also 6cfb6ef
2015-03-25 13:05:24 +01:00
6cfb6ef665 fix drop-zone drops
There is no special ‘-1’ indicator any more.
i->time_axis_view is unbound to allow relative
positioning when dragging multiple regions.
2015-03-25 12:11:49 +01:00
b637c2223f Major rework of DnD.
Allow dragging multiple regions from multiple
tracks across any number of hidden tracks and 
automation lanes.

fixes #6176 and #6172
2015-03-25 01:48:29 +01:00
92ba2d5780 partial fix for Canvas Region DnD & comments
Fixes #6172 and #6176 for single region drags.

Further work is needed if multiple regions on different tracks are dragged over hidden tracks
(see inline comment).
2015-03-24 15:25:39 +01:00
a5db1d588e Fix dragging regions to/from drop zone (#6137).
The previous code assumed that dragging up from the drop zone into the last
track is always valid.  This is not true when the type of the dragged region(s)
do not match that route, which resulted in a crash and/or bizarre behaviour.

This took entirely too long to figure out, there are some real nightmares in
the region drag code...
2015-03-15 03:45:26 -04:00
80bb72bbe2 fix drag-motion over TAV w/o view() 2015-03-08 03:42:33 +01:00
3f8583f8d6 stop dragged regions moving to the dropzone during autoscrolling towards the top track 2015-02-18 12:27:11 -05:00
dd8f2cfe18 fixes for non-overlapping fade in/out even in regions not at zero 2015-02-16 16:27:50 -05:00
236f549caa insanely complex fixes for dragging to and from the drop zone.
This probably breaks some of ardour's functionality (e.g. layered mode), but seems to
be either just right or very close to it for tracks

Conflicts:
	gtk2_ardour/editor_routes.cc
2015-02-13 17:00:30 -05:00
8304471062 fix up recent cherry-picks from waves' tracks 2015-02-13 16:42:05 -05:00
6f98f91f18 prevent fade in/fade out on audio regions from overlapping each other 2015-02-13 16:22:08 -05:00
456374c995 implement axis-limited dragging 2015-02-13 16:21:57 -05:00
994dff91a2 detect if drags appear to be vertical or horizontal as we cross the move threshold
Conflicts:
	gtk2_ardour/editor_drag.cc
	gtk2_ardour/editor_drag.h
2015-02-13 16:21:37 -05:00
eb45b3baaa fix behaviour of region-copy-drag when using the dropzone.
The copied regions all had a null playlist pointer, so they all ended up on
the same (new) track
2015-02-13 16:19:06 -05:00
78d76c197e allow normal right trimming even if the start of a range is at zero
Conflicts:
	gtk2_ardour/editor_drag.cc
2015-02-13 16:18:24 -05:00
bc2271b43e After dragging from multiple tracks to the dropzone, create the right number of new tracks.
This does not address the visual flattening that occurs before the drop
is complete. Doing that is complex and there is no immediate solution
visible. The result after the drop is complete is correct, however.
2015-02-13 16:17:27 -05:00
ef79d1c4d4 fix last cherry-pick 2015-02-09 14:46:20 -05:00
abcd70c1d2 After dragging from multiple tracks to the dropzone, create the right number of new tracks.
This does not address the visual flattening that occurs before the drop
is complete. Doing that is complex and there is no immediate solution
visible. The result after the drop is complete is correct, however.

Conflicts:
	gtk2_ardour/editor_drag.cc
2015-02-09 11:03:03 -05:00
ec37c83507 fixup cherry-picked changes from Waves Tracks, and fix for Ardour 2015-02-05 20:26:02 -05:00
7644533103 implement RangeMarkerBarDrag::abort
Conflicts:
	gtk2_ardour/editor_drag.cc
2015-02-05 19:34:31 -05:00
e6752fb729 implement MarkerDrag::abort() 2015-02-05 19:33:31 -05:00
7ffc06b08d fix issue with region dragging while mouse pointer is in rulers/marker lanes 2015-02-05 17:42:46 -05:00
nick_m
ff13ac8b4f Clean up Session's _current_trans when aborting a drag. 2015-02-05 23:32:57 +11:00
nick_m
f9b2587458 Make redo action insensitive after new command.
Don't erroneously send first_move more than once after autoscroll drag.
2015-02-05 19:57:56 +11:00
47f8125b35 amend e3da18fd 2015-01-26 17:14:24 +01:00
e3da18fd2f fix copy/drag abort. 2015-01-24 20:40:07 +01:00
22435bb53d make MouseCursors invalid cursor API be static; use to initialize default cursor value in Drag API; use C API to set canvas cursor 2015-01-24 12:26:58 -05:00
90c1e0ffd2 allow use of null pointer as a valid cursor (implies using cursor of parent window) 2015-01-23 15:19:36 -05:00
fe08965d91 fix indentation from prior commit 2015-01-23 13:45:21 -05:00
GZharun
6976a78100 [Summary] Fixed bug 45163: Trim range from right corner of timeline leads Tracks to crash
[Details] Crash was provoked because of an attempt to add commands to the session reversible command, but when autoscroll started and trim began with autoscroll the session reversible command was not created for for Trim Drag.
2015-01-23 13:43:52 -05:00
nick_m
ae7b978b0b Fixes for when rubberbanding_snaps_to_grid config setting is off.
The initial point and the ultimately selected items were always following
the snap settings. Also the VCC was displaying incorrectly on button press.
2015-01-20 04:49:44 +11:00
nick_m
ade1c4923c Fix note resize double undo bug.
Newly drawn notes are selected.
Clear midi note selection on Selection::set_state().
2015-01-17 04:55:05 +11: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
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
2a251b4570 MusicalTime => Beats. 2015-01-07 00:12:07 -05: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
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
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
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
116722f182 Fix uninitialized value in note create drag. 2014-12-07 20:37:53 -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
ea5876b836 Remove dead code. 2014-11-25 02:11:44 -05:00
d953f1ce0e when dragging on the canvas, use x,y pointer coordinates to decide if motion has occured.
Using _last_pointer_frame breaks when dragging to the left of the canvas, because we clamp
the value of the frame to >= 0. Motion would step once the pointer crossed the left edge
of the canvas because the frame value would always be zero.

This is not a problem when using the pointer x,y values which end up appropriately negative
under all conditions.
2014-11-24 21:59:29 +02:00
57c1b6e261 Fix quantization and other time-related ops. 2014-11-22 21:49:42 -05:00
c1cfa12d6e Wrap MusicalTime in a class.
This lets us get a more explicit handle on time conversions, and is the main
step towards using actual beat:tick time and getting away from floating point
precision problems.
2014-11-22 04:05:42 -05:00
9d8bbf4b9a Remove unused variables. 2014-11-20 11:31:31 -05:00
adea8ab68f Fix mismatched note resize drag cursor and behaviour. 2014-11-18 02:53:27 -05:00
563f5c11a6 Support cut/copy/paste of MIDI notes and controllers at the same time. 2014-11-16 22:35:45 -05:00
d63161426f Add "maybe" rounding modes for rounding only if necessary. 2014-11-16 22:35:45 -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
89a1980818 Only create MIDI regions on click when in draw mode.
It was much too easy to accidentally create MIDI regions in object mode.  If
the user isn't in draw mode anyway, then even after creating a region, they
can't put notes in it, so I don't think we've lost any discoverability here.
2014-11-15 02:03:40 -05:00
14e53b89c7 Fix wonky note length when create-dragging notes backwards.
Specifically, when pivoting from forwards to backwards (around the drag start
point), the note length was too long.  Setting both the start and end x
coordinates of the rect every time to the right value does the right thing.
2014-11-14 00:33:05 -05:00
589cc3162b Fix crash when deleting overlapped regions.
Use RegionSelection for MIDI regions as well, since the old dumb stub didn't do
some things correctly.  There's probably no reason to have a separate class for
this at all, and some good ones for putting all regions in the same selection,
so we should probably do that.  For now they are still separate in the
selection but use the same base class.
2014-11-13 21:32:08 -05: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
9331aa69bd new code to support creating skip markers 2014-09-17 09:39:29 -04:00
0676cfc070 fix double-click-shows-region-properties in Ripple mode 2014-09-15 11:43:12 -05:00
70358639de Revert "cont'd work on automation-track headers (amend ba53af1c5)"
This reverts commit beb5e3e777.
2014-09-04 16:14:01 +02:00
beb5e3e777 cont'd work on automation-track headers (amend ba53af1c5)
now that the separator line is at the top,
offset region-contents y0 by 1px.
2014-09-03 20:48:20 +02: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
b19e1a7985 remove EditAtSelectedMarker for Mixbus, to match mb2. (also fix an existing thinko in the edit point selection actions) (oops: also fix previous track selection fix so that it pays attention to the selection property of the group) 2014-07-14 10:08:55 -05:00
bff786257e polish a few blemishes and add some comments 2014-07-09 14:45:20 -05:00
12699574ae fix range select so it picks up grouped tracks 2014-07-09 14:34:14 -05:00
d99b6f0662 call Canvas::re_enter() at the end of a RegionCutDrag so that entered_regionview *might* be set 2014-07-08 21:37:49 -04:00
f250d16487 cut cursor follows grid 2014-07-08 16:08:31 -04:00
67eaa62ee9 fix build after copy-n-paste/code change collision 2014-07-07 10:21:47 -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
a34861c38e use an EditorCursor when dragging in cut mode to indicate cut position 2014-07-07 08:26:37 -04:00
779fe6c082 add functionality for cut tool 2014-07-07 07:05:44 -04:00
80d1631aa3 if a Range end is trimmed, in follow-edits mode, locate to the range end so it can be auditioned. (same as trimming a region end) 2014-07-03 12:56:33 -05: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
960e5a3c7c Ripple mode: ripple all after start of first selected region
Ripple drags should affect all regions which start at or after the
beginning of the first selected region, not just those which start after
its end.
2014-07-01 20:43:34 +01:00
264c62eb26 Ripple mode: remove debug output
Remove std::cerr output, and tidy up a couple of comments.
2014-07-01 20:43:34 +01: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
da65f3778c Fixes for ripple mode drag
Make undo of ripple mode dragging work a bit better, and hopefully prevent
rippled regions from jumping about when being dragged.
2014-07-01 18:46:13 +01:00