13
0

Selection: Region Operations in a Slot need a RegionView proxy (ToDo)

This commit is contained in:
Ben Loftis 2021-12-01 08:06:30 -06:00
parent 1489fabbcd
commit 9d0d8e1785
3 changed files with 19 additions and 3 deletions

View File

@ -5309,9 +5309,8 @@ Editor::get_regions_from_selection_and_mouse (timepos_t const & pos)
return regions;
}
/** Start with regions that are selected, or the entered regionview if none are selected.
* Then add equivalent regions on tracks in the same active edit-enabled route group as any
* of the regions that we started with.
/** Start with the selected Region(s) or TriggerSlot
* if neither is found, try using the entered_regionview (region under the mouse).
*/
RegionSelection
@ -5319,6 +5318,10 @@ Editor::get_regions_from_selection_and_entered () const
{
RegionSelection regions = selection->regions;
if (regions.empty() && !selection->triggers.empty()) {
regions = selection->trigger_regionview_proxy();
}
if (regions.empty() && entered_regionview) {
regions.add (entered_regionview);
}

View File

@ -232,6 +232,13 @@ Selection::clear_triggers (bool with_signal)
}
}
RegionSelection
Selection::trigger_regionview_proxy () const
{
RegionSelection rs;
return rs;
}
void
Selection::toggle (boost::shared_ptr<Playlist> pl)
{

View File

@ -131,6 +131,12 @@ public:
bool selected (ControlPoint*) const;
bool selected (TriggerEntry*) const;
/* ToDo: some region operations (midi quantize, audio reverse) expect
* a RegionSelection (a list of regionviews). We're likely going to
* need a region_view + time_axis_view proxy, and this will get it.
*/
RegionSelection trigger_regionview_proxy () const;
void set (std::list<Selectable*> const &);
void add (std::list<Selectable*> const &);
void toggle (std::list<Selectable*> const &);