// Construct importable locations
XMLNodeList const & locations = location_node->children();
- for (XMLNodeList::const_iterator it = locations.begin(); it != locations.end(); it++) {
+ for (XMLNodeList::const_iterator it = locations.begin(); it != locations.end(); ++it) {
try {
elements.push_back (ElementPtr ( new LocationImporter (source, session, *this, **it)));
} catch (failed_constructor err) {
string
LocationImporter::get_info () const
{
- nframes_t start, end;
+ framepos_t start, end;
Timecode::Time start_time, end_time;
// Get sample positions
LocationImporter::_prepare_move ()
{
try {
- Location const original (xml_location);
+ Location const original (session, xml_location);
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()) {
- rename_pair = Rename (_("The location is the Punch range. It will be imported as a normal range.\nYou may rename the imported location:"), name);
+ rename_pair = *Rename (_("The location is the Punch range. It will be imported as a normal range.\nYou may rename the imported location:"), name);
if (!rename_pair.first) {
return false;
}
}
if (location->is_auto_loop()) {
- rename_pair = Rename (_("The location is a Loop range. It will be imported as a normal range.\nYou may rename the imported location:"), name);
+ rename_pair = *Rename (_("The location is a Loop range. It will be imported as a normal range.\nYou may rename the imported location:"), name);
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())) {
- rename_pair = Rename (_("A location with that name already exists.\nYou may rename the imported location:"), name);
+ rename_pair = *Rename (_("A location with that name already exists.\nYou may rename the imported location:"), name);
if (!rename_pair.first) { return false; }
name = rename_pair.second;
}