summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-08-25 22:42:35 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-08-25 22:42:35 +0000
commit884ee2a3ccf545cc0502f82191e9cc54257e5420 (patch)
tree916f804e3e694f1727ff6c1c35b718d156a02a90
parentb92ebde801af5c499d16258860ee7a16da9623c4 (diff)
check dependents in Playlist after moving a region to a specific layer; make region layering editor appear reliably; click on xfade sets clicked_routeview
git-svn-id: svn://localhost/ardour2/branches/3.0@7692 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/editor.cc8
-rw-r--r--gtk2_ardour/editor_canvas_events.cc1
-rw-r--r--gtk2_ardour/region_layering_order_editor.cc1
-rw-r--r--libs/ardour/audio_playlist.cc2
-rw-r--r--libs/ardour/playlist.cc9
5 files changed, 11 insertions, 10 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index aa0a76edcd..816217cf0b 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -2017,7 +2017,7 @@ Editor::add_region_context_items (StreamView* sv, list<boost::shared_ptr<Region>
edit_items.push_back (MenuElem (menu_item_name, *region_menu));
if (multiple_regions_at_position && (layering_order_editor == 0 || !layering_order_editor->is_visible ())) {
- edit_items.push_back (MenuElem (_("Choose top region"), (bind (mem_fun(*this, &Editor::change_region_layering_order), position))));
+ edit_items.push_back (MenuElem (_("Choose Top Region"), (bind (mem_fun(*this, &Editor::change_region_layering_order), position))));
}
edit_items.push_back (SeparatorElem());
}
@@ -5572,17 +5572,13 @@ Editor::show_editor_list (bool yn)
void
Editor::change_region_layering_order (framepos_t position)
{
- if (!clicked_regionview) {
+ if (!clicked_routeview) {
if (layering_order_editor) {
layering_order_editor->hide ();
}
return;
}
- if (!clicked_routeview) {
- return;
- }
-
boost::shared_ptr<Track> track = boost::dynamic_pointer_cast<Track> (clicked_routeview->route());
if (!track) {
diff --git a/gtk2_ardour/editor_canvas_events.cc b/gtk2_ardour/editor_canvas_events.cc
index 3ec82b3746..a746883495 100644
--- a/gtk2_ardour/editor_canvas_events.cc
+++ b/gtk2_ardour/editor_canvas_events.cc
@@ -518,6 +518,7 @@ Editor::canvas_crossfade_view_event (GdkEvent* event, ArdourCanvas::Item* item,
case GDK_BUTTON_PRESS:
clicked_crossfadeview = xfv;
clicked_axisview = &clicked_crossfadeview->get_time_axis_view();
+ clicked_routeview = dynamic_cast<RouteTimeAxisView*>(clicked_axisview);
if (event->button.button == 3) {
return button_press_handler (item, event, CrossfadeViewItem);
}
diff --git a/gtk2_ardour/region_layering_order_editor.cc b/gtk2_ardour/region_layering_order_editor.cc
index 6f9ce645db..2f6963d7b7 100644
--- a/gtk2_ardour/region_layering_order_editor.cc
+++ b/gtk2_ardour/region_layering_order_editor.cc
@@ -219,6 +219,7 @@ RegionLayeringOrderEditor::maybe_present ()
hide ();
return;
}
+
present ();
}
diff --git a/libs/ardour/audio_playlist.cc b/libs/ardour/audio_playlist.cc
index 30e52fa316..cfc5a4028a 100644
--- a/libs/ardour/audio_playlist.cc
+++ b/libs/ardour/audio_playlist.cc
@@ -399,7 +399,7 @@ AudioPlaylist::check_dependents (boost::shared_ptr<Region> r, bool norefresh)
touched_regions = 0;
try {
- nframes_t xfade_length;
+ framecnt_t xfade_length;
switch (c) {
case OverlapNone:
break;
diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc
index 9c980ff735..93a4d520e8 100644
--- a/libs/ardour/playlist.cc
+++ b/libs/ardour/playlist.cc
@@ -2603,6 +2603,8 @@ Playlist::move_region_to_layer (layer_t target_layer, boost::shared_ptr<Region>
}
}
+ freeze ();
+
/* now reset the layers without holding the region lock */
for (list<LayerInfo>::iterator x = layerinfo.begin(); x != layerinfo.end(); ++x) {
@@ -2611,15 +2613,16 @@ Playlist::move_region_to_layer (layer_t target_layer, boost::shared_ptr<Region>
region->set_layer (target_layer);
-#if 0
- /* now check all dependents */
+ /* now check all dependents, since we changed the layering */
for (list<LayerInfo>::iterator x = layerinfo.begin(); x != layerinfo.end(); ++x) {
check_dependents (x->first, false);
}
check_dependents (region, false);
-#endif
+ notify_layering_changed ();
+
+ thaw ();
return 0;
}