_display.get_selection()->set_mode (SELECTION_MULTIPLE);
_display.add_object_drag (_columns.region.index(), "regions");
+ _display.set_drag_column (_columns.name.index());
/* setup DnD handling */
str = region->name();
}
- if (region->n_channels() > 1) {
- std::stringstream foo;
- foo << region->n_channels ();
- str += " [";
- str += foo.str();
- str += "]";
- }
-
- row[_columns.name] = str;
+ populate_row_name (region, row);
row[_columns.region] = region;
row[_columns.property_toggles_visible] = false;
framepos_t pos = 0;
bool copy = ((context->get_actions() & (Gdk::ACTION_COPY | Gdk::ACTION_LINK | Gdk::ACTION_MOVE)) == Gdk::ACTION_COPY);
- if (Profile->get_sae() || UIConfiguration::instance().get_only_copy_imported_files() || copy) {
+ if (UIConfiguration::instance().get_only_copy_imported_files() || copy) {
_editor->do_import (paths, Editing::ImportDistinctFiles, Editing::ImportAsRegion, SrcBest, pos);
} else {
_editor->do_embed (paths, Editing::ImportDistinctFiles, ImportAsRegion, pos);
}
void
-EditorRegions::name_editing_started (CellEditable* ce, const Glib::ustring&)
+EditorRegions::name_editing_started (CellEditable* ce, const Glib::ustring& path)
{
name_editable = ce;
if (e) {
e->set_name (X_("RegionNameEditorEntry"));
+
+ TreeIter iter;
+ if ((iter = _model->get_iter (path))) {
+ boost::shared_ptr<Region> region = (*iter)[_columns.region];
+
+ if(region) {
+ e->set_text(region->name());
+ }
+ }
}
}
name_editable = 0;
boost::shared_ptr<Region> region;
- TreeIter iter;
+ TreeIter row_iter;
- if ((iter = _model->get_iter (path))) {
- region = (*iter)[_columns.region];
- (*iter)[_columns.name] = new_text;
+ if ((row_iter = _model->get_iter (path))) {
+ region = (*row_iter)[_columns.region];
+ (*row_iter)[_columns.name] = new_text;
}
/* now mapover everything */
(*i)->region()->set_name (new_text);
}
}
- }
+ populate_row_name (region, (*row_iter));
+ }
}
/** @return Region that has been dragged out of the list, or 0 */