Save/restore location clock mode

- save mode separately for Editor-sidebar and Location Window
- cache mode (multiple calls to set_session())
- fix restore: after creating the editor, instant_save() is called,
  potentially overwriting the previous value.
This commit is contained in:
Robin Gareus 2017-02-14 17:15:16 +01:00
parent cf66f894bb
commit 8eff36913c
5 changed files with 69 additions and 10 deletions

View file

@ -2552,6 +2552,7 @@ Editor::set_state (const XMLNode& node, int version)
for (XMLNodeList::const_iterator i = children.begin(); i != children.end(); ++i) {
selection->set_state (**i, Stateful::current_state_version);
_regions->set_state (**i);
_locations->set_state (**i);
}
if ((prop = node.property ("maximised"))) {
@ -2693,6 +2694,7 @@ Editor::get_state ()
node->add_child_nocopy (LuaInstance::instance()->get_action_state());
node->add_child_nocopy (LuaInstance::instance()->get_hook_state());
node->add_child_nocopy (_locations->get_state ());
return *node;
}