in internal edit mode, a rubber-band select with no motion (i.e. click) selects region

This commit is contained in:
Paul Davis
2025-03-14 13:23:37 -06:00
parent f4b29e0efa
commit 367800830d
2 changed files with 14 additions and 0 deletions

View File

@@ -6730,6 +6730,19 @@ MidiRubberbandSelectDrag::deselect_things ()
/* XXX */
}
void
MidiRubberbandSelectDrag::finished (GdkEvent* ev, bool movement_occurred)
{
if (!movement_occurred) {
MidiRegionView* mrv = dynamic_cast<MidiRegionView*> (_midi_view);
if (mrv) {
mrv->editing_context().get_selection().set (mrv);
}
}
RubberbandSelectDrag::finished (ev, movement_occurred);
}
MidiVerticalSelectDrag::MidiVerticalSelectDrag (EditingContext& ec, MidiView* mv)
: RubberbandSelectDrag (ec, mv->drag_group (), [](GdkEvent*,timepos_t const &) { return true; })
, _midi_view (mv)

View File

@@ -1323,6 +1323,7 @@ class MidiRubberbandSelectDrag : public RubberbandSelectDrag
void select_things (int, Temporal::timepos_t const &, Temporal::timepos_t const &, double, double, bool);
void deselect_things ();
void finished (GdkEvent *, bool);
private:
MidiView* _midi_view;