summaryrefslogtreecommitdiff
path: root/gtk2_ardour/midi_time_axis.cc
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2015-06-17 09:26:40 +1000
committernick_m <mainsbridge@gmail.com>2015-06-17 09:54:23 +1000
commit44790ebff017173ff6a593c1278bbe6cbab3fa4b (patch)
treeda4dcd7064e961dc885677a1a011586b6b795c08 /gtk2_ardour/midi_time_axis.cc
parentd019ee836ca70965e6b981b6bde2a77ad11cb98a (diff)
More _reversible_command() auditing in the gui.
- try to keep begin/commit pairs in the same file where possible.
Diffstat (limited to 'gtk2_ardour/midi_time_axis.cc')
-rw-r--r--gtk2_ardour/midi_time_axis.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc
index be475216c1..e412b82c32 100644
--- a/gtk2_ardour/midi_time_axis.cc
+++ b/gtk2_ardour/midi_time_axis.cc
@@ -1509,8 +1509,9 @@ boost::shared_ptr<MidiRegion>
MidiTimeAxisView::add_region (framepos_t pos, framecnt_t length, bool commit)
{
Editor* real_editor = dynamic_cast<Editor*> (&_editor);
-
- real_editor->begin_reversible_command (Operations::create_region);
+ if (commit) {
+ real_editor->begin_reversible_command (Operations::create_region);
+ }
playlist()->clear_changes ();
real_editor->snap_to (pos, RoundNearest);