diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-12-30 17:28:05 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-12-30 17:28:05 +0000 |
commit | ccc93c4aef54a29d0a85a3fae098e47c2d6e671d (patch) | |
tree | a4ea4e060ef364cc48c41ac755b899910c68679b /gtk2_ardour/editor_ops.cc | |
parent | 6df1d06f8b5fc8813b89c07b43df12b0ba1ac754 (diff) |
centralize use of "from-context-menu" in Editor::get_preferred_edit_position(), and use it when pasting as well
git-svn-id: svn://localhost/ardour2/branches/3.0@11118 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index b16eac3fd4..9bdd2e26a8 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -3957,10 +3957,11 @@ Editor::cut_copy_ranges (CutCopyOp op) } void -Editor::paste (float times) +Editor::paste (float times, bool from_context) { DEBUG_TRACE (DEBUG::CutNPaste, "paste to preferred edit pos\n"); - paste_internal (get_preferred_edit_position(), times); + + paste_internal (get_preferred_edit_position (false, from_context), times); } void @@ -4563,13 +4564,7 @@ Editor::insert_patch_change (bool from_context) return; } - framepos_t p; - - if (!from_context || (_edit_point != EditAtMouse)) { - p = get_preferred_edit_position (false); - } else { - p = event_frame (&context_click_event, 0, 0); - } + const framepos_t p = get_preferred_edit_position (false, from_context); Evoral::PatchChange<Evoral::MusicalTime> empty (0, 0, 0, 0); PatchChangeDialog d (0, _session, empty, Gtk::Stock::ADD); |