diff options
author | ben <ben@harrisonconsoles.com> | 2013-10-20 16:02:56 -0500 |
---|---|---|
committer | Ben Loftis <ben@harrisonconsoles.com> | 2015-04-21 10:22:28 -0500 |
commit | e2afdb21c348e89c39cd2d5f46e06d7f2726a43c (patch) | |
tree | 8de85e21e209d083ba9c08479281c5c66b02f153 /gtk2_ardour/editor.cc | |
parent | 84f0dceefb2e4079e1f015a17e538f0cd795ba2e (diff) |
minor tweaks to Cut Time dialog. Use an enum to tell preferred_edit_location what to ignore, so cut and insert dialogs will never use mouse location.
Diffstat (limited to 'gtk2_ardour/editor.cc')
-rw-r--r-- | gtk2_ardour/editor.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 09d70e40d6..b1a1d7c4c6 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -1796,7 +1796,7 @@ Editor::add_region_context_items (Menu_Helpers::MenuList& edit_items, boost::sha _popup_region_menu_item->set_label (menu_item_name); } - const framepos_t position = get_preferred_edit_position (false, true); + const framepos_t position = get_preferred_edit_position (EDIT_IGNORE_NONE, true); edit_items.push_back (*_popup_region_menu_item); if (track->playlist()->count_regions_at (position) > 1 && (layering_order_editor == 0 || !layering_order_editor->is_visible ())) { @@ -4655,7 +4655,7 @@ Editor::sort_track_selection (TrackViewList& sel) } framepos_t -Editor::get_preferred_edit_position (bool ignore_playhead, bool from_context_menu, bool from_outside_canvas) +Editor::get_preferred_edit_position (EditIgnoreOption ignore, bool from_context_menu, bool from_outside_canvas) { bool ignored; framepos_t where = 0; @@ -4676,10 +4676,14 @@ Editor::get_preferred_edit_position (bool ignore_playhead, bool from_context_men return entered_marker->position(); } - if (ignore_playhead && ep == EditAtPlayhead) { + if ( (ignore==EDIT_IGNORE_PHEAD) && ep == EditAtPlayhead) { ep = EditAtSelectedMarker; } + if ( (ignore==EDIT_IGNORE_MOUSE) && ep == EditAtMouse) { + ep = EditAtPlayhead; + } + switch (ep) { case EditAtPlayhead: if (_dragging_playhead) { @@ -5773,7 +5777,7 @@ Editor::show_editor_list (bool yn) void Editor::change_region_layering_order (bool from_context_menu) { - const framepos_t position = get_preferred_edit_position (false, from_context_menu); + const framepos_t position = get_preferred_edit_position (EDIT_IGNORE_NONE, from_context_menu); if (!clicked_routeview) { if (layering_order_editor) { |