Fix missing entries in region-list #8701
RegionFactory::CheckNewRegion signal is emitted directly after region-creation from RegionFactory::create(). At this point in time the region is not on any playlist. This if fine for EditorSources, but the new RegionList design only shows regions that are on the timeline. CheckNewRegion() -> EditorRegions::add_region() -> EditorRegions::regions_changed() ignores regions w/o playlist. Later Playlist::add_region_internal() sets the playlist but calls Region::clear_changes() to not send all individual changes. So Region::RegionsPropertyChanged is not emitted either. We need to notify the EditorRegions *after* setting the playlist. The downside of this is that more signals than necessary are emitted.
This commit is contained in:
parent
f11fadcc94
commit
4d269729b1
@ -587,6 +587,7 @@ Playlist::notify_region_added (boost::shared_ptr<Region> r)
|
|||||||
pending_contents_change = false;
|
pending_contents_change = false;
|
||||||
RegionAdded (boost::weak_ptr<Region> (r)); /* EMIT SIGNAL */
|
RegionAdded (boost::weak_ptr<Region> (r)); /* EMIT SIGNAL */
|
||||||
ContentsChanged (); /* EMIT SIGNAL */
|
ContentsChanged (); /* EMIT SIGNAL */
|
||||||
|
RegionFactory::CheckNewRegion (r); /* EMIT SIGNAL */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -655,6 +656,7 @@ Playlist::flush_notifications (bool from_undo)
|
|||||||
for (s = pending_adds.begin (); s != pending_adds.end (); ++s) {
|
for (s = pending_adds.begin (); s != pending_adds.end (); ++s) {
|
||||||
(*s)->clear_changes ();
|
(*s)->clear_changes ();
|
||||||
RegionAdded (boost::weak_ptr<Region> (*s)); /* EMIT SIGNAL */
|
RegionAdded (boost::weak_ptr<Region> (*s)); /* EMIT SIGNAL */
|
||||||
|
RegionFactory::CheckNewRegion (*s); /* EMIT SIGNAL */
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((regions_changed && !in_set_state) || pending_layering) {
|
if ((regions_changed && !in_set_state) || pending_layering) {
|
||||||
|
Loading…
Reference in New Issue
Block a user