summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-12-30 16:21:10 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-12-30 16:21:10 +0000
commit6df1d06f8b5fc8813b89c07b43df12b0ba1ac754 (patch)
tree18cd6b0b9e762ebfa946686f8703434ab5005ccd /gtk2_ardour
parent42aea0b9fd7877420b58233c7c5979c04a02b1f1 (diff)
fix logic for context-menu-mouse-dependent actions so that if the edit point is not the mouse, we still use the edit point even from the context menu. klar?
git-svn-id: svn://localhost/ardour2/branches/3.0@11117 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor.cc6
-rw-r--r--gtk2_ardour/editor_ops.cc3
2 files changed, 5 insertions, 4 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index ea8cc07209..bcd91e0760 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -5360,10 +5360,10 @@ Editor::change_region_layering_order (bool from_context_menu)
{
framepos_t position;
- if (from_context_menu) {
- position = event_frame (&context_click_event, 0, 0);
- } else {
+ if (!from_context_menu || (_edit_point != EditAtMouse)) {
position = get_preferred_edit_position ();
+ } else {
+ position = event_frame (&context_click_event, 0, 0);
}
if (!clicked_routeview) {
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index 39f6fa2b88..b16eac3fd4 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -4558,13 +4558,14 @@ void
Editor::insert_patch_change (bool from_context)
{
RegionSelection rs = get_regions_from_selection_and_entered ();
+
if (rs.empty ()) {
return;
}
framepos_t p;
- if (!from_context) {
+ if (!from_context || (_edit_point != EditAtMouse)) {
p = get_preferred_edit_position (false);
} else {
p = event_frame (&context_click_event, 0, 0);