try {
elements.push_back (ElementPtr ( new LocationImporter (source, session, *this, **it)));
} catch (failed_constructor err) {
try {
elements.push_back (ElementPtr ( new LocationImporter (source, session, *this, **it)));
} catch (failed_constructor err) {
location = new Location (original); // Updates id
} catch (failed_constructor& err) {
throw std::runtime_error (X_("Error in session file!"));
location = new Location (original); // Updates id
} catch (failed_constructor& err) {
throw std::runtime_error (X_("Error in session file!"));
std::pair<bool, string> rename_pair;
if (location->is_auto_punch()) {
std::pair<bool, string> rename_pair;
if (location->is_auto_punch()) {
if (!rename_pair.first) { return false; }
location->set_auto_loop (false, this);
if (!rename_pair.first) { return false; }
location->set_auto_loop (false, this);
Locations::LocationList const & locations(session.locations()->list());
for (Locations::LocationList::const_iterator it = locations.begin(); it != locations.end(); ++it) {
if (!((*it)->name().compare (location->name())) || !handler.check_name (location->name())) {
Locations::LocationList const & locations(session.locations()->list());
for (Locations::LocationList::const_iterator it = locations.begin(); it != locations.end(); ++it) {
if (!((*it)->name().compare (location->name())) || !handler.check_name (location->name())) {