mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 08:36:32 +01:00
Fix internal select all.
This commit is contained in:
parent
937cf046a4
commit
ee8dbdb009
2 changed files with 15 additions and 23 deletions
|
|
@ -703,7 +703,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
|
|
||||||
void set_selected_track (TimeAxisView&, Selection::Operation op = Selection::Set, bool no_remove=false);
|
void set_selected_track (TimeAxisView&, Selection::Operation op = Selection::Set, bool no_remove=false);
|
||||||
void select_all_tracks ();
|
void select_all_tracks ();
|
||||||
void select_all_internal_edit (Selection::Operation);
|
bool select_all_internal_edit (Selection::Operation);
|
||||||
|
|
||||||
bool set_selected_control_point_from_click (bool press, Selection::Operation op = Selection::Set);
|
bool set_selected_control_point_from_click (bool press, Selection::Operation op = Selection::Set);
|
||||||
void set_selected_track_from_click (bool press, Selection::Operation op = Selection::Set, bool no_remove=false);
|
void set_selected_track_from_click (bool press, Selection::Operation op = Selection::Set, bool no_remove=false);
|
||||||
|
|
|
||||||
|
|
@ -1366,15 +1366,26 @@ Editor::select_all_in_track (Selection::Operation op)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
bool
|
||||||
Editor::select_all_internal_edit (Selection::Operation)
|
Editor::select_all_internal_edit (Selection::Operation)
|
||||||
{
|
{
|
||||||
|
bool selected = false;
|
||||||
|
|
||||||
for (RegionSelection::iterator i = selection->regions.begin(); i != selection->regions.end(); ++i) {
|
for (RegionSelection::iterator i = selection->regions.begin(); i != selection->regions.end(); ++i) {
|
||||||
MidiRegionView* mrv = dynamic_cast<MidiRegionView*>(*i);
|
MidiRegionView* mrv = dynamic_cast<MidiRegionView*>(*i);
|
||||||
if (mrv) {
|
if (mrv) {
|
||||||
mrv->select_all_notes ();
|
mrv->select_all_notes ();
|
||||||
|
selected = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MidiRegionView* mrv = dynamic_cast<MidiRegionView*>(entered_regionview);
|
||||||
|
if (mrv) {
|
||||||
|
mrv->select_all_notes ();
|
||||||
|
selected = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return selected;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -1384,27 +1395,8 @@ Editor::select_all_objects (Selection::Operation op)
|
||||||
|
|
||||||
TrackViewList ts = track_views;
|
TrackViewList ts = track_views;
|
||||||
|
|
||||||
if (internal_editing()) {
|
if (internal_editing() && select_all_internal_edit(op)) {
|
||||||
|
return; // Selected notes
|
||||||
bool midi_selected = false;
|
|
||||||
|
|
||||||
for (TrackViewList::iterator iter = ts.begin(); iter != ts.end(); ++iter) {
|
|
||||||
if ((*iter)->hidden()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
RouteTimeAxisView* rtav = dynamic_cast<RouteTimeAxisView*> (*iter);
|
|
||||||
|
|
||||||
if (rtav && rtav->is_midi_track()) {
|
|
||||||
midi_selected = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (midi_selected) {
|
|
||||||
select_all_internal_edit (op);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (TrackViewList::iterator iter = ts.begin(); iter != ts.end(); ++iter) {
|
for (TrackViewList::iterator iter = ts.begin(); iter != ts.end(); ++iter) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue