fix touch-recording of automation in a loop
[ardour.git] / gtk2_ardour / region_editor.cc
index 564938ad5c75479704ab3df4e585c9af3bce4154..16888fb6880d2d7160d60eeda70aeb240abc58a6 100644 (file)
@@ -33,7 +33,7 @@
 #include "main_clock.h"
 #include "gui_thread.h"
 #include "region_editor.h"
-#include "utils.h"
+#include "public_editor.h"
 
 #include "i18n.h"
 
@@ -270,7 +270,7 @@ RegionEditor::connect_editor_events ()
 void
 RegionEditor::position_clock_changed ()
 {
-       _session->begin_reversible_command (_("change region start position"));
+       PublicEditor::instance().begin_reversible_command (_("change region start position"));
 
        boost::shared_ptr<Playlist> pl = _region->playlist();
 
@@ -280,13 +280,13 @@ RegionEditor::position_clock_changed ()
                _session->add_command(new StatefulDiffCommand (_region));
        }
 
-       _session->commit_reversible_command ();
+       PublicEditor::instance().commit_reversible_command ();
 }
 
 void
 RegionEditor::end_clock_changed ()
 {
-       _session->begin_reversible_command (_("change region end position"));
+       PublicEditor::instance().begin_reversible_command (_("change region end position"));
 
        boost::shared_ptr<Playlist> pl = _region->playlist();
 
@@ -296,7 +296,7 @@ RegionEditor::end_clock_changed ()
                _session->add_command(new StatefulDiffCommand (_region));
        }
 
-       _session->commit_reversible_command ();
+       PublicEditor::instance().commit_reversible_command ();
 
        end_clock.set (_region->position() + _region->length() - 1, true);
 }
@@ -306,7 +306,7 @@ RegionEditor::length_clock_changed ()
 {
        framecnt_t frames = length_clock.current_time();
 
-       _session->begin_reversible_command (_("change region length"));
+       PublicEditor::instance().begin_reversible_command (_("change region length"));
 
        boost::shared_ptr<Playlist> pl = _region->playlist();
 
@@ -316,7 +316,7 @@ RegionEditor::length_clock_changed ()
                _session->add_command(new StatefulDiffCommand (_region));
        }
 
-       _session->commit_reversible_command ();
+       PublicEditor::instance().commit_reversible_command ();
 
        length_clock.set (_region->length());
 }
@@ -400,25 +400,25 @@ RegionEditor::audition_state_changed (bool yn)
 void
 RegionEditor::sync_offset_absolute_clock_changed ()
 {
-       _session->begin_reversible_command (_("change region sync point"));
+       PublicEditor::instance().begin_reversible_command (_("change region sync point"));
 
         _region->clear_changes ();
        _region->set_sync_position (sync_offset_absolute_clock.current_time());
        _session->add_command (new StatefulDiffCommand (_region));
 
-       _session->commit_reversible_command ();
+       PublicEditor::instance().commit_reversible_command ();
 }
 
 void
 RegionEditor::sync_offset_relative_clock_changed ()
 {
-       _session->begin_reversible_command (_("change region sync point"));
+       PublicEditor::instance().begin_reversible_command (_("change region sync point"));
 
         _region->clear_changes ();
        _region->set_sync_position (sync_offset_relative_clock.current_time() + _region->position ());
        _session->add_command (new StatefulDiffCommand (_region));
 
-       _session->commit_reversible_command ();
+       PublicEditor::instance().commit_reversible_command ();
 }
 
 bool