From fa7e7a462c8da7ae635dd2ab2fba85b3f84bc6d0 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 10 Jan 2022 21:36:17 +0100 Subject: [PATCH] Work-around/Fix DnD from sidebar to editor-canvas Editor::drop_regions() creates a new RegionInsertDrag() with the region to drop to the timeline. RegionInsertDrag is-a RegionMotionDrag is-a RegionDrag is-a Drag. However the region does not yet exist on the timeline and RegionView is NULL. This will likely need an API change. e.g. Directly pass the TimeDomain as argument. The information can be provided by the region, or from the TimeAxisView or RouteUI when dropping a new source/region. --- gtk2_ardour/editor_drag.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index 19be8f022e..3785fa7747 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -601,7 +601,7 @@ struct TimeAxisViewStripableSorter { }; RegionDrag::RegionDrag (Editor* e, ArdourCanvas::Item* i, RegionView* p, list const & v) - : Drag (e, i, p->region()->position().time_domain()) + : Drag (e, i, p && p->region () ? p->region()->position().time_domain() : Temporal::AudioTime) , _primary (p) , _ntracks (0) {