Allow DnD to TriggerBox from Editor's sidebar

This commit is contained in:
Robin Gareus 2021-12-14 21:34:21 +01:00
parent 8d137b1514
commit 142ca9fd07
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04

View file

@ -805,15 +805,13 @@ TriggerBoxUI::drag_data_received (Glib::RefPtr<Gdk::DragContext> const& context,
return; return;
} }
if (data.get_target() == X_("regions")) { if (data.get_target() == X_("regions")) {
#if 0 boost::shared_ptr<Region> region = PublicEditor::instance().get_dragged_region_from_sidebar ();
/* TODO -- get access to Editor::_regions */
/boost::shared_ptr<Region> region = EditorRegions::get_dragged_region ();
if (region) { if (region) {
_triggerbox.set_from_selection (n, region); _triggerbox.set_from_selection (n, region);
context->drag_finish (true, false, time); context->drag_finish (true, false, time);
} else {
context->drag_finish (false, false, time);
} }
#endif
context->drag_finish (false, false, time);
return; return;
} }