From 759af2a1ed0a0f52e29fb97a4679db0fc22d4fe0 Mon Sep 17 00:00:00 2001 From: Valeriy Kamyshniy Date: Tue, 17 Feb 2015 16:31:19 +0200 Subject: [PATCH] [Summary] When undo/redo, the restored locked state did not reflect reflect in the Editor. **************** REVIEW FROM PAUL IS REQUIRED ********************** --- libs/ardour/location.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libs/ardour/location.cc b/libs/ardour/location.cc index 9e7aa4f0ed..50de20cba5 100644 --- a/libs/ardour/location.cc +++ b/libs/ardour/location.cc @@ -657,9 +657,13 @@ Location::set_state (const XMLNode& node, int version) _flags = Flags (string_2_enum (prop->value(), _flags)); if ((prop = node.property ("locked")) != 0) { - _locked = string_is_affirmative (prop->value()); + if (string_is_affirmative (prop->value())) { + lock (); + } else { + unlock (); + } } else { - _locked = false; + unlock (); } for (cd_iter = cd_list.begin(); cd_iter != cd_list.end(); ++cd_iter) { @@ -1096,7 +1100,7 @@ Locations::set_state (const XMLNode& node, int version) // changed locations will be updated by Locations::changed signal loc->set_block_change_notifications (true); loc->set_state (**niter, version); - loc->set_block_change_notifications (false); + loc->set_block_change_notifications (false); } else { loc = new Location (_session, **niter); }