#include "ardour/audioregion.h"
#include "ardour/audiofilesource.h"
+#include "ardour/silentfilesource.h"
#include "ardour/region_factory.h"
#include "ardour/session.h"
-#include "ardour/session_playlists.h"
-#include "ardour/silentfilesource.h"
#include "ardour/profile.h"
#include "gtkmm2ext/choice.h"
#include "utils.h"
#include "editor_regions.h"
#include "editor_drag.h"
+#include "main_clock.h"
#include "i18n.h"
{
_display.set_size_request (100, -1);
_display.set_rules_hint (true);
+ _display.set_name ("EditGroupList");
/* Try to prevent single mouse presses from initiating edits.
This relies on a hack in gtktreeview.c:gtk_treeview_button_press()
//ARDOUR_UI::instance()->secondary_clock.mode_changed.connect (sigc::mem_fun(*this, &Editor::redisplay_regions));
ARDOUR_UI::instance()->secondary_clock->mode_changed.connect (sigc::mem_fun(*this, &EditorRegions::update_all_rows));
- ARDOUR::Region::RegionPropertyChanged.connect (region_property_connection, MISSING_INVALIDATOR, ui_bind (&EditorRegions::region_changed, this, _1, _2), gui_context());
- ARDOUR::RegionFactory::CheckNewRegion.connect (check_new_region_connection, MISSING_INVALIDATOR, ui_bind (&EditorRegions::add_region, this, _1), gui_context());
+ ARDOUR::Region::RegionPropertyChanged.connect (region_property_connection, MISSING_INVALIDATOR, boost::bind (&EditorRegions::region_changed, this, _1, _2), gui_context());
+ ARDOUR::RegionFactory::CheckNewRegion.connect (check_new_region_connection, MISSING_INVALIDATOR, boost::bind (&EditorRegions::add_region, this, _1), gui_context());
- e->EditorFreeze.connect (editor_freeze_connection, MISSING_INVALIDATOR, ui_bind (&EditorRegions::freeze_tree_model, this), gui_context());
- e->EditorThaw.connect (editor_thaw_connection, MISSING_INVALIDATOR, ui_bind (&EditorRegions::thaw_tree_model, this), gui_context());
+ e->EditorFreeze.connect (editor_freeze_connection, MISSING_INVALIDATOR, boost::bind (&EditorRegions::freeze_tree_model, this), gui_context());
+ e->EditorThaw.connect (editor_thaw_connection, MISSING_INVALIDATOR, boost::bind (&EditorRegions::thaw_tree_model, this), gui_context());
}
bool
TreeModel::iterator iter = _model->get_iter ("0");
TreeModel::Row parent;
- TreeModel::Row child;
if (!iter) {
parent = *(_model->append());
for (TreeView::Selection::ListHandle_Path::iterator i = rows.begin(); i != rows.end(); ++i) {
- if (iter = _model->get_iter (*i)) {
+ if ((iter = _model->get_iter (*i))) {
+
boost::shared_ptr<Region> region = (*iter)[_columns.region];
// they could have clicked on a row that is just a placeholder, like "Hidden"
if (region) {
- if (region->automatic()) {
-
- _display.get_selection()->unselect(*i);
-
- } else {
- _change_connection.block (true);
- _editor->set_selected_regionview_from_region_list (region, Selection::Add);
-
- _change_connection.block (false);
- }
+ _change_connection.block (true);
+ _editor->set_selected_regionview_from_region_list (region, Selection::Add);
+ _change_connection.block (false);
}
}
+
}
} else {
_editor->get_selection().clear_regions ();
row[_columns.position] = _("Mult.");
} else {
char buf[16];
- cerr << "Adding a region " << region->name() << " at " << region->position() << endl;
format_position (region->position(), buf, sizeof (buf));
row[_columns.position] = buf;
}
if (_editor->convert_drop_to_paths (paths, context, x, y, data, info, time) == 0) {
framepos_t pos = 0;
- if (Profile->get_sae() || Config->get_only_copy_imported_files()) {
+ bool copy = ((context->get_actions() & (Gdk::ACTION_COPY | Gdk::ACTION_LINK | Gdk::ACTION_MOVE)) == Gdk::ACTION_COPY);
+
+ if (Profile->get_sae() || Config->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);
if (region) {
vector<RegionView*> equivalents;
- _editor->get_regions_corresponding_to (region, equivalents);
+ _editor->get_regions_corresponding_to (region, equivalents, false);
for (vector<RegionView*>::iterator i = equivalents.begin(); i != equivalents.end(); ++i) {
if (new_text != (*i)->region()->name()) {