Commit Graph

1307 Commits

Author SHA1 Message Date
a6c9c04fd6
Hide snap cursor when not using mouse edit #7966 2020-04-01 22:55:06 +02:00
75adc33629
Remove unused variable 2020-04-01 22:55:06 +02:00
b7e30cfc24 remove debug output 2020-03-30 17:37:10 -06:00
04635896d4 add braces as per coding guide 2020-03-30 17:25:07 -06:00
6fec78221f use const ref to UIConfiguration::instance() to shorten lines a bit 2020-03-30 17:25:07 -06:00
4162f0f1ba
Fix snap if there are no locations - amend 4a036a2da 2020-03-30 18:16:09 +02:00
4a036a2daa Grid: explicitly check for empty marker list (fixes: grid fails if no start+end markers yet) 2020-03-28 08:10:36 -05:00
25c0bd9274 Prevent updates to the playhead when a locate is pending after a drag/click is used to move the playhead.
There are two problem cases:

  1) the drag "fake-located" the playhead, but a redraw happens before the locate itself finishes.
  2) the transport emits Session::PositionChanged from Session::non_realtime_stop(), even though
     this is occuring in the "middle" of the locate process (we stop first).

In the first case, the drag code sets _pending_locate_request, since we need this to be true even
before the queued SessionEvent for the locate has been processed. So to deal with this case

In the second case, we use Session::locate_initiated() to decide if we're in the middle of a locate.
2020-03-25 18:39:59 -06:00
f49aedaa39 Fix odd right click crash on master track.
To reproduce. Launch, right click in ruler area then drag down
until over the master track and let go.

#0  0x0000555555ba1d44 in boost::shared_ptr<ARDOUR::Route>::get() const (this=0x8) at /usr/include/boost/smart_ptr/shared_ptr.hpp:748
#1  0x0000555555ba0a2f in boost::dynamic_pointer_cast<ARDOUR::Track, ARDOUR::Route>(boost::shared_ptr<ARDOUR::Route> const&) (r=...)
    at /usr/include/boost/smart_ptr/shared_ptr.hpp:904
#2  0x000055555650b92b in RouteUI::track() const (this=0x0) at ../gtk2_ardour/route_ui.cc:1885
#3  0x0000555555d0b92f in Editor::popup_track_context_menu(int, int, ItemType, bool) (this=
    0x555557a3efd0, button=1, time=600214966, item_type=StreamItem, with_selection=false) at ../gtk2_ardour/editor.cc:1595
#4  0x0000555555e1a4cf in Editor::button_release_handler(ArdourCanvas::Item*, _GdkEvent*, ItemType) (this=0x555557a3efd0, item=
    0x555557b2fe00, event=0x7fffffffc310, item_type=StreamItem) at ../gtk2_ardour/editor_mouse.cc:1543
....
2020-03-03 13:49:04 -06:00
42630f145a include a LocateTransportDisposition argument when Editor initially locates
Not clear if the editor really needs to make this call at all
2020-01-20 11:14:28 -07:00
47767738b9 rename DoTheRightThing to RollIfAppropriate 2020-01-18 08:49:18 -07: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
a62df60760
Replace some Gtk:MessageDialog with Ardour's variant
This fixes some issues with stuck splash screen early on.
2020-01-15 22:08:42 +01:00
85485d4832 Allow the Cut tool to appear in Mixbus. 2019-09-29 10:12:00 -05:00
468731c14b goodbye Profile->...trx 2019-09-25 13:02:31 -06:00
ca4b6bb7e9
NO-OP: fix some Wimplicit-fallthrough, see prev commit 2019-09-18 17:38:01 +02:00
64fd7a7511 Foldback bus should not appear in editor 2019-08-26 19:01:19 -07:00
7859340191
Consolidate code, skip editor/mixer update check 2019-08-24 18:37:28 +02:00
629289dc4a
Fix crash when selected automation-lane is removed
When a plugin is deleted, automation-lanes of the given plugin
are removed, but previously a pointed to the deleted lane remained
in the selection.

This caused crashes later when the track selection is used. e.g.
during sensitize_the_right_region_actions()

Note that ~TimeAxisView() also emits CatchDeletion (this);
however "this" fails to be dynamic_cast<AutomationTimeAxisView*>
because that d'tor has already been completed.
2019-08-24 18:24:21 +02:00
f4897bb475
Re-order editor sidebar: prioritize "Tracks & Busses" 2019-08-12 18:36:26 +02: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
da3d8e5418 (Source List) Implement insert-region action... now uses the Source List. 2019-08-01 12:11:31 -05:00
71c2ed8160 (Source List) Source list, Region List: Resolve various action+behaviors between the 2 lists.
Duplicate the remove_unsued_region action in the Session->Cleanup menu, for discoverability.
Region list should use the same Region actions as the canvas...
OK, now resolve the change in use-cases of Region List and Source List.  tentative.
Rough-in remove_selected_sources (Delete in Sources list).
Column tweaks.
2019-08-01 12:11:31 -05:00
b1019bbbf6 (Source List) Region List rewrite (gtk2 part)
See:  https://docs.google.com/document/d/1sI7p9RoRVZtNx2n67RvBa0_16fuZblV_lNkkKN2g93s/edit?usp=sharing
2019-08-01 12:11:31 -05:00
90962d3426 (Source List) Source property signals (gtk2 part)
See:  https://docs.google.com/document/d/1sI7p9RoRVZtNx2n67RvBa0_16fuZblV_lNkkKN2g93s/edit?usp=sharing
2019-08-01 12:11:31 -05:00
8017a7fc1e
Backport Mixbus toolbutton layout 2019-04-09 03:16:09 +02:00
932892f794
Fix Mixbus special case 2019-03-29 14:54:16 +01:00
1a90cd90de
Fix action-name 2019-03-29 14:54:16 +01:00
51df70b405 ActionManager::get_all_actions() no longer includes <Actions> in the paths it returns, part 3 (GUI) 2019-03-20 11:15:47 -07:00
21e2b353c1 Add an exception handler for access_action() used by control surfaces and Lua. 2019-03-19 11:52:19 -05:00
c09c7bab52
Update GUI, use Session::playlists() getter (2/2) 2019-03-19 05:14:40 +01:00
7ed27e3ef7
Request for comment: Bug or feature? 2019-03-07 23:50:59 +01:00
12a415f077
Cleanup Editor/Marker context-menu
This could have caused crashes previously:
::build_range_marker_menu() may have created range_marker_menu
while the GUI wanted transport_marker_menu.
2019-03-07 23:50:46 +01:00
3bc9281c31
Fix some Gtk::Menu related memory leaks
A Gtk::manage()d widget will be deleted when its parent container
is destroyed. Top-level context menus are not inside a container and
hence need to be manually deallocated.

This adds explicit delete calls for menus where there is a
member variable reference to the Menu.
2019-03-07 23:50:32 +01:00
204d7bf76c
Remove cruft: unused members 2019-03-07 22:25:19 +01:00
b410cd07ab
Remove unused region_edit_menu & edit-point action 2019-03-07 22:25:19 +01:00
00934aec0d
Initialize per session instant state
Per session (instant.xml) GUI options do not have a sigc::slot<> backed
configuration interface to initialize the Actions.

This fixes a first-time start issue (no instant.xml) where GUI panes
may be visible (default) while the actions are "off" (default).

This is a tentative solution, instant.xml backed ToggleAction
initialization needs to be consolidated somehow.
2019-02-28 23:54:13 +01:00
17f5fb81d2 replace ::cast_dynamic() with relevant ActionManager::get_*_action() calls 2018-12-12 11:22:38 -05:00
685c4f8955 change action group owner pointer to be the relevant keybindings; reorder setting keybindings value and defining actions
The reorder is required so that the value of "bindings" has been set and is meaningful
2018-12-11 05:06:26 -05:00
927a33c5f3
Remove redundant call (there's no session, nothing to save) 2018-12-07 03:46:58 +01:00
d864f42d20
Fix editor sizing issue introduced in 4dc65e66
Previously Editor::instant_save() returned if no session was loaded,
effectively Config->add_instant_xml(get_state()); was never called.

instant save() is called early on, in Editor's c'tor before the editor
is realized and saves invalid window-size and window-state, which
are used later.
2018-12-07 03:46:47 +01:00
4dc65e6613
Prefer testing the session instead of using a global variable 2018-12-06 02:24:31 +01:00
4423945643 start using ActionMap in preference to ActionManager 2018-12-05 17:33:06 -05:00
5396385b95 Fix playhead smoothing when auditioning.
Don't use timer to keep moving the playhead when auditioning.
This fixes playhead jiggling during audition.
2018-11-11 03:38:34 +01:00
9971e718fe Save Lua UI scripts separately
Previously EditorAction and ExitorHook scripts were saved with
instant.xml. The were saved with each session and in the config
dir (for new sessions). This allowed inconsistent UI setups, especially
when loading old sessions that had no or different scripts.

Now Editor scripts (actions and hooks) are saved in a dedicated file,
session-independently. This goes along with ui_config in general
e.g. action-table-columns

The scripts are not saved with ui_config file for two reasons:
ui_config settings related to built-in  ui_config_vars.h,
and in the future there may be further indirection like "ui-rc-file".

Note: previously loaded editor scripts are lost with this change.
2018-11-04 18:47:14 +01:00
aad354e15f Fix missing enum case: Avoid a divide-by-0 crash. 2018-08-13 13:08:33 -05:00
1b531116e4 Allow to disable smart ruler changes. 2018-07-27 00:28:55 +02:00
232096bcb2 NO-OP: clean up whitespace, separate methods 2018-07-27 00:28:52 +02: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
ec070d5497 Don't cut-off grid-type.
Now that the zoom buttons are right-aligned, a variable spaced grid
selector is less of an issue (except perhaps on 1024px wide screens)
2018-07-23 18:51:23 +02:00
870fe055cf make use-note-color-for-velocity much much more efficient
(by not invoking the global color change signal)
2018-07-03 18:33:11 -04:00
b1ad462a7a respond to changes in use-note-color-for-velocity 2018-07-03 17:02:20 -04:00
38b499a8f0 permit editing velocity bars option 2018-07-03 15:39:28 -04:00
Johannes Mueller
e6a6778466 Revert frame -> sample changes where it's a frame as in Gtk::Frame 2018-06-19 20:17:40 +02:00
e83301daaa Replace the check for SnapPref, which went missing. Some functions (like playhead_to_next_grid) can request GridOnly. 2018-05-08 08:43:44 -05:00
d88cdcc1bf Reinstate the ability to split regions while dragging playhead. I think this was unintentionally lost. 2018-02-27 13:08:40 -06:00
a699a637e4 Switch CDFrame grid to use MinSec ruler rather than Sample ruler. 2018-02-26 18:52:28 -06:00
e1b380b302 Rename SMPTE enum back to Timecode. 2018-02-26 18:38:18 -06:00
22819b8d2f Fix a rather large naming thinko: GridTypeSamples should be CDFrames. 2018-02-26 17:02:24 -06:00
6989e5b11d Snap-to-grid should not invalidate other snap options. This was a leftover behavior from prior iterations of Snap+Grid. 2018-02-24 10:53:03 -06: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
75122af118 Fix/amend a23a8ebcad.
Updated condition to check for transport_rolling to include preroll and
count-in (speed is != 0 during pre-roll and count-in, but transport is not
actually rolling).
2018-02-24 12:55:48 +01:00
eb15d37669 Use transport_stopped() instead of speed check. 2018-02-23 13:59:53 -06:00
a23a8ebcad Do not interpolate playhead when stopped.
This fixes a bug where, for a few seconds after transport stops, the users zoom+panning would get hijacked by the follow_playhead behavior, because the playhead was still "hunting".
2018-02-23 13:48:29 -06:00
1a293bb480 Add drop-shadow decorators to menu bar and transport toolbar.
Allow status bar to fill available width.
2018-02-19 08:05:55 -06:00
710066d317 Tweak packing to line-up button edges with transport toolbar. 2018-02-17 09:24:15 -06:00
5200885fb8 GTKOSX is not a valid check. Use __APPLE__ 2018-02-17 09:12:51 -06:00
f54f270627 Fix a few warnings 2018-02-17 09:12:38 -06:00
df9bb50155 Revert TRIANGLE_WIDTH for mac. Must be a pango/cairo issue on mac. 2018-02-14 08:15:45 -06:00
6cca669c9a COMBO_TRIANGLE_WIDTH should be an odd value. 2018-02-13 08:17:46 -06:00
8e4e7fde05 Re-pack Editor Toolbar:
Move zoom tools to right of toolbar.
Tweak numeric (mode) keybindings to more closely match the order they appear in the UI.
Add some new default keybindings.
2018-02-12 11:42:21 -06:00
8f9f927212 Timecode instead of SMPTE. 2018-02-12 09:15:26 -06:00
ef5a6db864 Tweak combo-box sizing to match actual triangle size. Tweak size of grid_type_selector. 2018-02-12 09:13:39 -06:00
0e72ba4b64 Fix potential crash in snap_to_grid (grid-mark list is empty). 2018-02-11 12:05:23 -06:00
0299229e41 SoloSelection: gui part. 2018-02-11 09:39:45 -06:00
bc4fa677ec Copy+Paste thinko: use passed-in variable instead of member variable. Maybe fix potential crash. 2018-02-10 09:06:46 -06:00
5e24b17478 Fix potential crash with EditAtSelectedMarker, when no marker is selected. 2018-02-09 13:43:20 -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
231e25544b Tweak 842d758e: selection & move into view
Use separate editor + mixer flags for moving selected tracks into view.
Changing selection in the Editor will only pan the mixer-view and vice-
versa. This fixes an issue with the track that is being clicked-on to
be moved out of view (due to groups)
2017-10-21 21:07:18 +02:00
d554dcc096 These are "Frames" :) 2017-10-01 04:00:50 +02:00
7db12f6b12 convert codebase to use Temporal for various time types 2017-09-24 12:03:54 -04: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
339c64180e Fix crash when hiding multiple tracks
Editor::hide_track_in_display() -> EditorRoutes::hide_track_in_display()
and ensuing calls to sync the treeview may modify the selection
(de-select hidden tracks) and invalidate selection->tracks
2017-09-11 18:30:32 +02:00
631629b8e7 Editor zoom: add zoom_to_extents() 2017-08-26 23:06:29 -05:00
e9f4c5fc1c Editor zooming: Initialize leftmost_frame, for sessions that start at high timecodes. 2017-08-26 22:44:58 -05:00
cba622cdce Add Lua bindings to set toggle-actions 2017-08-09 16:29:24 +02:00
7009ff0300 Update Selection API to include all Stripables 2017-08-06 22:17:58 +02:00
e91821bd76 Fix pasting automation at 0 2017-07-27 03:22:21 +02:00
05ddcdc004 Initialize some uninitialized variables
Editor::redisplay_tempo() is called early on, before
Editor::set_timecode_ruler_scale() and Editor::compute_bbt_ruler_scale ()
are called.  That is a bug which needs fixing (initial tempo+grid display)
. Still, uninitialized vars are not good.
2017-07-23 19:20:35 +02:00
1438086c6c tweak "visible track count", take automation lanes into account. 2017-07-19 22:15:22 +02:00
ea05241771 Editor Summary: Changes to behavior
* Remove up/down buttons.
* Allow the summary to shrink smaller.
* Vertical drag results in zoom.
* Scroll-wheel results in zoom.
* Tweak mouse cursor to better indicate behaviors.
* ToDo:  refactor the zooming code.
2017-07-18 10:37:35 -05:00
f9e5e4360e Move more Gtkmm2ext widgets into libwidget 2017-07-17 21:06:04 +02:00
b5e9451bc7 Remove unused sources & includes 2017-07-17 21:06:04 +02:00
5c92613698 Separate Ardour UI widgets into dedicated library 2017-07-17 21:06:04 +02:00
1be9e9d19e Remove unused variable (amend 79384339e) 2017-07-01 23:40:11 +02:00
Thomas Brand
79384339e9 Correctly display region name in context menu 2017-07-01 22:55:31 +02:00
Thomas Brand
63ea7b6516 NO-OP whitespace (updated GH PR #357) 2017-07-01 19:28:26 +02:00
285ec18aa5 Don't interpolate&smooth playhead pos during export. 2017-06-29 18:40:51 +02:00
a9224abcf4 Add explicit VideoTimeline change-type, follow up on f73ce2d 2017-06-28 18:46:07 +02:00
f73ce2d47f Reset idle_handler_id (fixes idle zoom -- bug in 265f52535a)
If pending_visual_change.pending was zero when calling idle_visual_changer
the handler_id was never reset. and the idle-handler was never called
again.
2017-06-28 18:45:15 +02:00
5f30d87fd0 Changes to Editor::visual_changer to support Item/Canvas::prepare_for_render
This is necessary to allow calculation of correct intersection of visible
canvas area and items for the new Item::prepare_for_render() API.

samples_per_pixel must be set first to calculate the new horizontal canvas
position in Editor::set_horizontal_position and then
WaveView::set_samples_per_pixel will eventually call
WaveView::prepare_for_render for those items that are visible on the new canvas
position at the new position.

Or if there is not a change to zoom state then call Canvas::prepare_for_render
explicitly.

Also changes so that each method is only called once during
Editor::visual_changer
2017-06-26 08:40:47 +10:00
265f52535a Coalesce visual changes to canvas/items and allow canvas to render
First visual change will be processed as normal and then blocked until the
canvas renders the change. If further visual changes need processing then
Editor::pre_render callback will schedule another expose/redraw/render.

This prevents an issue where idle_visual_changer is called many times in
response to events(keys/motion/etc) but the canvas does not get a chance to
render any but the last one which results in a big pause/jump.

This results in a more responsive canvas and in particular a smoother and more
predictable zooming experience.
2017-06-26 08:40:47 +10:00
2b0adc8f75 Remove LocaleGuards from Editor class
All float <=> string conversions are now done using locale independent
PBD::to_string/string_to() via XMLNode::get/set_property
2017-06-22 10:48:38 +10:00
1d28665f86 Use Stripable::Sorter in GUI consistently. 2017-06-17 04:36:39 +02:00
nick_m
b4ddbce1ff Fix incorrect positioning of tempo line subdivisions if first meter is non-zero
Commit cebefe6 assumed that frame 0 was the music origin.
Silly me.
2017-06-09 11:05:56 +10:00
nick_m
e9f2e32b71 Delete tempo lines when session goes away 2017-06-09 01:08:59 +10:00
6ac76734f5 cut buffer must not mess around with libardour selection
Fixes range mode selection/cut/copy that would previously clear track selection
2017-06-07 12:28:53 -04:00
a84b1a375a Editor::axis_view_by_control() needs to explore child tracks, now that Selection is relying on it 2017-05-05 18:56:25 +01:00
dc0139d4af use CoreSelection for track selection 2017-05-05 18:56:25 +01:00
8335155863 fix ruler scaling -- #7226 2017-05-05 14:00:30 +02:00
a4b9014932 Use XMLNode::get/set_property API in Editor class 2017-04-19 09:36:55 +10:00
fda05ac64b Use ID::to_s() in gtk2_ardour instead of ID::print() 2017-04-19 07:49:58 +10:00
54bab5153f don't set region selection on loading a session 1 by 1, but just once after they should all exist 2017-04-03 00:33:44 +02:00
752706911e Fix crash when dragging playhead or mouse in ruler area
This can be hard to reproduce and I have not been able to work out the steps to
reproduce reliably, but as it is still occuring work around the issue by just
checking the variable is valid before dereferencing it.

Resolves: #7304
2017-04-01 22:04:56 +10:00
a534258594 Reset Playhead interpolation when looping and locating 2017-03-31 14:16:04 +02:00
eea8fbd1c5 NO-OP, semantic tweak 2017-03-30 22:07:06 +02:00
453e07d0a2 make selection of tracks/busses after adding them slightly more efficient 2017-03-26 16:12:10 +02:00
55b8b44889 Improve playhead updates, reduce jitter for follow PH, stationary PH
* resolve rounding mistakes
* extrapolate and filter position using GUI timing
* track engine's position
2017-03-23 19:21:50 +01:00
4491722eae Editor: forward unmap events to widgets 2017-03-20 17:12:08 +01:00
2562a5ce3b Save/Restore TimeInfoBox clock modes
The clocks are not transient, so ARDOUR_UI::store_clock_modes takes
care of saving the state and the clock restores itself.
2017-03-10 20:39:46 +01:00
nick_m
2780662432 no-op - comment/whitespace fixes. 2017-03-05 05:34:41 +11:00
f64441aa58 remove method no longer needed
Editor::track_selection_changed() is now invoked by EditorRoutes::sync_treeview_from_presentation_info(),
AFTER the Selection has been updated
2017-02-26 18:24:56 +01:00
9e543beb56 Add some convenient public editor methods (for lua-bindings)
and s/get// in the old API for consistency.
2017-02-24 16:10:14 +01:00
1e4e97019d Lua bindings to access editor selection + region selection bindings 2017-02-23 22:32:32 +01:00
92e203a19e Consolidate ActionChanged callbacks, add tooltips 2017-02-18 16:14:41 +01:00
c8d6ddfd10 Don't scroll-jump when selecting all tracks 2017-02-18 01:25:13 +01:00
472f14c803 Allow Lua action scripts to provide a button icon 2017-02-17 18:58:11 +01:00
a31e70a7d5 check region action sensitivity from two more places that may alter it 2017-02-16 10:29:48 +01:00
d463720b6d simplify arguments to Editor::sensitize_the_right_region_actions() 2017-02-15 20:07:49 +01:00
3d3f2a79f6 use leave/enter from track canvas to be the primary driver of region action sensitivity
This works for context menus also, because GTK sends us leave/enter notify
events when they appear.
2017-02-15 20:07:49 +01:00
2cc94f8880 tentative steps in trying to fix region action sensitivity 2017-02-15 20:07:49 +01:00
8eff36913c Save/restore location clock mode
- save mode separately for Editor-sidebar and Location Window
- cache mode (multiple calls to set_session())
- fix restore: after creating the editor, instant_save() is called,
  potentially overwriting the previous value.
2017-02-14 17:15:16 +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
8ca53c4497 make editor respond to track seleciton change again 2017-01-28 11:16:50 +01:00
cc82fc675b remove editor/mixer selection change signals; make editor and mixer use PresentationInfo::Change more correctly; make Selection a bit smarter when setting track selection 2017-01-27 22:17:53 +01:00
nick_m
7b9784fff4 mark session dirty when dragging tempo markers. 2017-01-27 03:05:32 +11:00
1d2a76f239 Free some one time alloc of the UI (cleaner valgrind output)
No incremental leaks here..
* downcase (const char*) uses strdup, caller needs to free
* free allocated cursors when the editor is destroyed
* drop static editor lua-instance & bindings
* delete allocated gtk image/icons
2017-01-20 13:53:37 +01:00
a8afe7faab Remove cruft 2017-01-20 11:43:42 +01:00
7939c2211c Add comment regarding themeable boxes 2017-01-18 18:28:21 -06:00
45622aff48 Allow editor toolbar and background to be themeable. 2017-01-18 18:25:25 -06:00
058f1cf9e1 Fix editor-mixer update when deleting a Route before a VCA
When deleting the last track before a VCA, on-delete the editor-mixer
switches to display the next TAV.  If that turns out to be a VCATAV,
the editor-mixer will ignore it and keep displaying the deleted route,
holding a shared pointer reference (ports won't be dropped, etc etc).
2017-01-13 08:43:18 +01:00
nick_m
d0580ecfbc allow all types of range location (loop, start, end etc.) to be glued to bars and beats. 2016-12-29 01:39:31 +11:00
a6b4d8b8c6 fix editor sidebar show/hide with embedded TimeInfo 2016-12-23 03:56:01 +01:00
deb059ff0d Fix Ardour Editor-button height 2016-12-20 19:01:59 +01:00
0c0ebccdf7 Fix Mixbus Editor-toolbar icons & height 2016-12-20 18:48:10 +01:00
f6dc24b901 Prepare for re-use of TimeInfoBox w/o punch-clock 2016-12-20 03:59:15 +01:00
6ebf14c2c2 Fix the case of jump-to-next{prev}-Mark. 2016-12-19 17:25:59 -06: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
06938105a4 Simplify spacer code 2016-12-18 21:39:36 +01:00
dae2dcd53e Transport Layout: horizontal separator makes it look too busy. Commented out for now. 2016-12-18 13:47:14 -06:00
ab37491614 repack widgets, and add some spacer elements 2016-12-18 13:34:15 -06:00
448f921dd8 Transport Layout:
* Remove some redundant containers and frames, for a cleaner look.
* Adjust transport button spacing and sizes to more closely match the editor toolbar.
2016-12-18 09:02:13 -06:00
85e4b1d98f Move selection/punch clocks to editor Sidebar 2016-12-17 02:43:42 +01:00
e1826f8b1c Add API to query editor's playhead cursor position 2016-12-17 02:43:42 +01:00
b34a614df4 Further fixes to non-cxx11 enabled builds
Hopefully all that is necessary this time
2016-12-13 17:10:30 +10:00
89623923bd Change Zoom to Selection action (Z key) to zoom on both axes
Add Zoom to Selection (Horizontal) action to access previous behavior.

Remove Editor::temporal_zoom_region as it was duplicate code and broken for
both_axes

Should Resolve: #7112
2016-12-13 12:25:03 +10:00
61c7af141d Clarify "frames" (video, timecode) vs "samples" (audio) 2016-12-08 12:45:44 +01:00
3d925ef503 braces, please 2016-12-08 10:49:26 +00:00
01f8ca831a cont'd work to prevent duplicate playlist names 2016-11-25 14:24:29 +01:00
nick_m
05355d0306 fix incorrect return type for Editor::get_grid_music_divisions(). 2016-11-17 03:13:16 +11:00
nick_m
715b178130 Improve bbt ruler drawing performance for large time ranges.
- when the timeline displays many bars, zoom/autoscroll
	  speed is improved by calculating the bbt ruler scale first
	  then requesting a suitably scaled grid.
2016-10-19 03:56:43 +11:00
nick_m
9698f16aee Note selection state uses note event_id_t. 2016-10-15 23:50:02 +11:00
78d02eb620 Revert "Editor does not need to reset track/stripable selection, since Selection already maintains that itself"
This reverts commit 57652d7d50f706e2f0e525c6f48c1fc7830cf222.
2016-09-27 14:59:32 -05:00
238ca58c93 Editor does not need to reset track/stripable selection, since Selection already maintains that itself 2016-09-27 14:59:32 -05:00
c9ece0d6c6 use moved version of reset_focus() 2016-09-06 16:17:39 -04:00
nick_m
e689182a6a Editor::get_grid_type_as_beats() returns the quarter note equivalent of BBT beat and bar. 2016-09-02 05:11:54 +10:00
nick_m
086096b465 Use quarter-note based 'beat' when snapping. 2016-08-31 23:12:11 +10:00
822810b88f the endless quest to plug memory leaks -- episode 379 2016-07-25 17:38:59 +02:00
ac8f4baa00 add some flush_pending timeouts 2016-07-25 14:51:23 +02:00
cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
da7d7f9502 many changes associated with rationalizing selection flow 2016-07-06 13:39:10 -04:00
2f71967be2 fix crash when loading a saved visual state 2016-07-05 23:49:50 +02:00
906f7e1edd GUI doesn't need to listen to old ControlProtocol signals for stripable selection 2016-07-04 12:45:53 -04:00
8b142a2fd6 make Selection catch up with session/libardour-side selection status at session load 2016-07-02 16:09:19 -04:00
36d7e3c61b fix use of removed Session::get_nth_stripable() 2016-07-02 16:08:58 -04:00
9f5d0930fc use pane position mgmt on appropriate panes 2016-06-13 09:53:10 -04:00
nick_m
24f64b3ea7 Make exact beat calculation of tempi a bit less cumbersome. Move tempi on an audio basis for non-musical snap. 2016-06-12 02:46:13 +10:00
3eaa6c0389 remove certain ControlProtocol signals related to stripable selection
includes change to Mackie support so that strips listen for PropertyChange
on the stripables they represent, no global selection change used anymore.
2016-06-10 13:57:18 -04:00
5833576d5b ensure that dropdowns in editor toolbar are populated at first use (with no existing config file to set them) 2016-06-06 14:29:58 -04:00
a0f0bdc063 try to keep editor+mixer treemodels in sync 2016-06-06 12:58:48 -04:00
ea05a66736 when adding a list of Stripables, sort them into PresentationInfo order first 2016-06-05 16:33:01 -04:00
c7d6262e9f there is no PresentationInfo::global_order_t any more 2016-06-05 16:33:01 -04:00
2161c5d507 use new RouteGroup property names 2016-06-05 16:33:01 -04:00
260058a4a9 move from PresentationInfo::global_order() to PresentationInfo::order, and fix up part of reordering behaviour
Dragging tracks/busses in the editor *below* VCAs still does not work
2016-06-03 15:15:39 -04:00
3835b782b3 part three of using LocaleGuard with pane sizes 2016-06-02 08:17:20 -04:00
bac7a13d0f the second half of using LocaleGuard with pane sizes 2016-06-02 08:09:34 -04:00
79a9be434c add LocaleGuards to 2 places where we save pane sizes (which are floating point values now) 2016-06-02 08:04:08 -04:00
2562b4a2f0 handle old-version pane positions by ignoring them 2016-05-31 15:30:45 -04:00
76620819e0 use new pane API 2016-05-31 15:30:45 -04:00
cc88501d97 set minimum size for editor list 2016-05-31 15:30:45 -04:00
a26a85de14 set editor pane cursors 2016-05-31 15:30:45 -04:00
91a95b086a initial sort-of-mostly-working integration of new Pane 2016-05-31 15:30:45 -04:00
482873760c initial implementation of VCA time axis views 2016-05-31 15:30:44 -04:00
4cd6d52013 make Escape (cancel drag or selection) work in mixer as well as editor 2016-05-31 15:30:44 -04:00
8b48aff077 fix GUI handling of surface select requests to include possibility of selecting non-Routes 2016-05-31 15:30:43 -04:00
08f01085de remove now-redundant control protocol route-selection signals 2016-05-31 15:30:43 -04:00
3eae4b0974 tweak Editor to use Stripable methods for control-surface-driven selection 2016-05-31 15:30:42 -04:00