diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-11-26 17:20:34 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-11-26 17:20:34 +0000 |
commit | 1268bf8b45d2f7c4dad55f055b4f76d4b66c5dd3 (patch) | |
tree | f833ae99c935fca7c7afa6a686bdcb2bd4452046 /gtk2_ardour/editor_region_list.cc | |
parent | 90a5607604a6a8853fa780285561aff706531589 (diff) |
more ongoing SAE-driven changes (too many too list here)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2715 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_region_list.cc')
-rw-r--r-- | gtk2_ardour/editor_region_list.cc | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gtk2_ardour/editor_region_list.cc b/gtk2_ardour/editor_region_list.cc index b59b7ff583..ea65e31c54 100644 --- a/gtk2_ardour/editor_region_list.cc +++ b/gtk2_ardour/editor_region_list.cc @@ -38,6 +38,7 @@ #include "ardour_ui.h" #include "gui_thread.h" #include "actions.h" +#include "region_view.h" #include "utils.h" #include "i18n.h" @@ -632,3 +633,30 @@ Editor::region_list_selection_filter (const RefPtr<TreeModel>& model, const Tree return true; } + +void +Editor::region_name_edit (const Glib::ustring& path, const Glib::ustring& new_text) +{ + boost::shared_ptr<Region> region; + TreeIter iter; + + if ((iter = region_list_model->get_iter (path))) { + region = (*iter)[region_list_columns.region]; + (*iter)[region_list_columns.name] = new_text; + } + + /* now mapover everything */ + + if (region) { + vector<RegionView*> equivalents; + get_regions_corresponding_to (region, equivalents); + + for (vector<RegionView*>::iterator i = equivalents.begin(); i != equivalents.end(); ++i) { + if (new_text != (*i)->region()->name()) { + (*i)->region()->set_name (new_text); + } + } + } + +} + |