Add static meta-data for x-ardour/region.pbdid DnD

During drag-motion callbacks the data to be dragged is n/a.
However we like to discriminate if drop is possible.

When dragging regions, the data-type of the region to be dragged
is unknown, so different `x-ardour/region` targets are not an
option, either.

Until a better option is presented, a static global is used
to set the data-type for region.pbdid drags.
This commit is contained in:
Robin Gareus 2022-01-19 05:05:57 +01:00
parent 62a098811c
commit 50bccb44d5
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
6 changed files with 53 additions and 23 deletions

View file

@ -425,6 +425,9 @@ public:
: action (a), target (tgt) {}
};
/* data-type of [region] object currently dragged with x-ardour/region.pbdid */
static ARDOUR::DataType pbdid_dragged_dt;
std::map<std::string,RegionAction> region_action_map;
Glib::RefPtr<Gtk::ActionGroup> editor_actions;