diff options
author | nick_m <mainsbridge@gmail.com> | 2014-12-15 00:13:38 +1100 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-12-18 11:03:10 -0500 |
commit | 9af9e17adc96f7c27ce0e1651d6949393e787636 (patch) | |
tree | 395fb4ddffd3a66ba0e8021bd7ec1de137c315d2 /gtk2_ardour/region_editor.cc | |
parent | 2c8a769aaef7465f170edf37982733fd19d89c0e (diff) |
Add editor selection state to session history via a SelectionMemento, which
combines selection related editor properties with the current editor selection.
The related editor properties are:
mouse mode,
zoom setting,
left frame of the canvas,
y origin of the canvas.
Selection state now includes region views (storing the underlying region id)
and time.
This patch also fixes a region mute undo bug.
Diffstat (limited to 'gtk2_ardour/region_editor.cc')
-rw-r--r-- | gtk2_ardour/region_editor.cc | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/gtk2_ardour/region_editor.cc b/gtk2_ardour/region_editor.cc index 511314dfc5..16888fb688 100644 --- a/gtk2_ardour/region_editor.cc +++ b/gtk2_ardour/region_editor.cc @@ -33,6 +33,7 @@ #include "main_clock.h" #include "gui_thread.h" #include "region_editor.h" +#include "public_editor.h" #include "i18n.h" @@ -269,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(); @@ -279,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(); @@ -295,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); } @@ -305,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(); @@ -315,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()); } @@ -399,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 |