From 3bfb01a77b7433930f775bfebffc95157afb581f Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 27 May 2021 09:01:59 -0600 Subject: [PATCH] improved logic for Editor::add_region_marker() --- gtk2_ardour/editor_ops.cc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 78bdbf5d76..e4767ffa00 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -8771,14 +8771,15 @@ Editor::add_region_marker () CueMarker marker (str, region->start() + (position - region->position())); - if (!in_command) { - begin_reversible_command (_("add cue marker")); - in_command = true; - } - for (SourceList::iterator s = sources.begin(); s != sources.end(); ++s) { - (*s)->add_cue_marker (marker); - _session->add_command (new StatefulDiffCommand (*s)); + if ((*s)->add_cue_marker (marker)) { + if (!in_command) { + begin_reversible_command (_("add cue marker")); + in_command = true; + } + _session->add_command (new StatefulDiffCommand (*s)); + cerr << "added to reversible command\n"; + } } }