X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=libs%2Fardour%2Flocation.cc;h=c693e1f5d55034e3d84f421990a3206755fc7296;hb=63e3f326e9f61498a03a62a57d2e0787c19bf5c9;hp=e8909112250b0e391f9eecfe8c78c2fc814b2dde;hpb=8488d8f6a53d3385893a435481cb60ed21c21ea0;p=ardour.git diff --git a/libs/ardour/location.cc b/libs/ardour/location.cc index e890911225..c693e1f5d5 100644 --- a/libs/ardour/location.cc +++ b/libs/ardour/location.cc @@ -645,8 +645,13 @@ Location::set_state (const XMLNode& node, int version) return -1; } + Flags old_flags (_flags); _flags = Flags (string_2_enum (prop->value(), _flags)); + if (old_flags != _flags) { + FlagsChanged (); + } + if ((prop = node.property ("locked")) != 0) { _locked = string_is_affirmative (prop->value()); } else { @@ -754,9 +759,13 @@ Location::unlock () void Location::set_scene_change (boost::shared_ptr sc) { - _scene_change = sc; - - scene_changed (); /* EMIT SIGNAL */ + if (_scene_change != sc) { + _scene_change = sc; + _session.set_dirty (); + + scene_changed (); /* EMIT SIGNAL */ + SceneChangeChanged (); /* EMIT SIGNAL */ + } } /*---------------------------------------------------------------------- */ @@ -819,8 +828,12 @@ Locations::next_available_name(string& result,string base) const string& temp ((*i)->name()); if (!temp.find (base,0)) { - - if ((suffix = atoi (temp.substr(l,3))) != 0) { + /* grab what comes after the "base" as if it was + a number, and assuming that works OK, + store it in "taken" so that we know it + has been used. + */ + if ((suffix = atoi (temp.substr(l))) != 0) { taken.insert (make_pair (suffix,true)); } }