Emit selection RegionsChanged when region is removed

This is required to properly update the selection.
Previously deleting a region did not update selection
markers and other selection displays that depend on
Editor::get_selection_extents (which includes region selection).

This fixes a crash: Select a region (this sets a time-selection).
Delete the region, click on the time-selection markers (red triangles).
This commit is contained in:
Robin Gareus 2023-09-10 15:23:53 +02:00
parent 1c8b91ed86
commit d37f85f9d2
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
3 changed files with 3 additions and 15 deletions

View file

@ -77,6 +77,9 @@ Selection::Selection (const PublicEditor* e, bool mls)
void (Selection::*point_remove)(ControlPoint*) = &Selection::remove;
ControlPoint::CatchDeletion.connect (*this, MISSING_INVALIDATOR, boost::bind (point_remove, this, _1), gui_context());
void (Selection::*rv_remove)(RegionView*) = &Selection::remove;
RegionView::RegionViewGoingAway.connect (*this, MISSING_INVALIDATOR, boost::bind (rv_remove, this, _1), gui_context());
}
#if 0