diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2008-02-23 15:22:58 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2008-02-23 15:22:58 +0000 |
commit | 7e531020180affdae2d98ddd93594e7a1e9b4721 (patch) | |
tree | 2329a282a5be65183968e2db2c188d6ec6a843bd /gtk2_ardour/editor.cc | |
parent | 80c6243429ea1996ec0d3be2f42d33d92e5f578f (diff) |
fix up use of plugin input counts when running; SAE menu tweaks; fix up management and display of edit point selection; AU window stuff
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3117 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor.cc')
-rw-r--r-- | gtk2_ardour/editor.cc | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 1a70f6b754..40030bb201 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -723,8 +723,7 @@ Editor::Editor () set_snap_to (snap_type); snap_mode = SnapOff; set_snap_mode (snap_mode); - _edit_point = EditAtMouse; - set_edit_point_preference (_edit_point); + set_edit_point_preference (EditAtMouse, true); XMLNode* node = ARDOUR_UI::instance()->editor_settings(); set_state (*node); @@ -2157,9 +2156,9 @@ Editor::set_snap_mode (SnapMode mode) instant_save (); } void -Editor::set_edit_point_preference (EditPoint ep) +Editor::set_edit_point_preference (EditPoint ep, bool force) { - bool changed = _edit_point != ep; + bool changed = (_edit_point != ep); _edit_point = ep; string str = edit_point_strings[(int)ep]; @@ -2170,7 +2169,7 @@ Editor::set_edit_point_preference (EditPoint ep) set_canvas_cursor (); - if (!changed) { + if (!force && !changed) { return; } @@ -2194,6 +2193,25 @@ Editor::set_edit_point_preference (EditPoint ep) break; } + const char* action; + + switch (_edit_point) { + case EditAtPlayhead: + action = "edit-at-playhead"; + break; + case EditAtSelectedMarker: + action = "edit-at-marker"; + break; + case EditAtMouse: + action = "edit-at-mouse"; + break; + } + + Glib::RefPtr<Action> act = ActionManager::get_action ("Editor", action); + if (act) { + Glib::RefPtr<RadioAction>::cast_dynamic(act)->set_active (true); + } + instant_save (); } @@ -2267,7 +2285,7 @@ Editor::set_state (const XMLNode& node) } if ((prop = node.property ("edit-point"))) { - set_edit_point_preference ((EditPoint) string_2_enum (prop->value(), _edit_point)); + set_edit_point_preference ((EditPoint) string_2_enum (prop->value(), _edit_point), true); } if ((prop = node.property ("mouse-mode"))) { |