diff options
author | Robin Gareus <robin@gareus.org> | 2017-03-10 19:37:02 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-03-10 20:38:23 +0100 |
commit | eac0a2b6ecd6d83c84d72cbc8d2ef55eb89d9ae1 (patch) | |
tree | 1cdc7bc8a80cd95522e89fec6298d4b1354dbb68 /gtk2_ardour/location_ui.cc | |
parent | 6af51b52ffd66612b06b14bda8d7a51b7a9efe22 (diff) |
Fix LocationUI clock-mode save/load & caching
(sidebar uses explicit LocationUI::set_state(), Location Window
implicit set_session)
Diffstat (limited to 'gtk2_ardour/location_ui.cc')
-rw-r--r-- | gtk2_ardour/location_ui.cc | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/gtk2_ardour/location_ui.cc b/gtk2_ardour/location_ui.cc index 7aeced896e..ec6448bfe8 100644 --- a/gtk2_ardour/location_ui.cc +++ b/gtk2_ardour/location_ui.cc @@ -1151,11 +1151,7 @@ XMLNode & LocationUI::get_state () const { XMLNode* node = new XMLNode (_state_node_name); - if (_mode_set) { - node->add_property (X_("clock-mode"), enum_2_string (_mode)); - } else { - node->add_property (X_("clock-mode"), enum_2_string (_clock_group->clock_mode ())); - } + node->add_property (X_("clock-mode"), enum_2_string (_clock_group->clock_mode ())); return *node; } @@ -1171,9 +1167,7 @@ LocationUI::set_state (const XMLNode& node) } _mode = (AudioClock::Mode) string_2_enum (p->value (), AudioClock::Mode); _mode_set = true; - if (_clock_group) { - _clock_group->set_clock_mode (_mode); - } + _clock_group->set_clock_mode (_mode); return 0; } @@ -1186,7 +1180,7 @@ LocationUI::clock_mode_from_session_instant_xml () XMLNode* node = _session->instant_xml (_state_node_name); if (!node) { - return AudioClock::Frames; + return ARDOUR_UI::instance()->secondary_clock->mode(); } XMLProperty const * p = node->property (X_("clock-mode")); |