summaryrefslogtreecommitdiff
path: root/libs/surfaces
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2017-05-05 12:31:21 +0100
committerPaul Davis <paul@linuxaudiosystems.com>2017-05-05 18:56:25 +0100
commit0c035778e162bd5934fc0070e43a26ffb4c8825a (patch)
tree0fa5ae935d4d5effc9e3ae372d8b2905f1578110 /libs/surfaces
parentccd19ed0615bfb300bedc23ac48de7f426a7948e (diff)
libardour now has CoreSelection object to manage selection status of Stripables and AutomationControls
Diffstat (limited to 'libs/surfaces')
-rw-r--r--libs/surfaces/mackie/mackie_control_protocol.cc4
-rw-r--r--libs/surfaces/mackie/strip.cc4
-rw-r--r--libs/surfaces/osc/osc.cc12
-rw-r--r--libs/surfaces/push2/mix.cc8
4 files changed, 12 insertions, 16 deletions
diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc
index 62d0abab09..a359982799 100644
--- a/libs/surfaces/mackie/mackie_control_protocol.cc
+++ b/libs/surfaces/mackie/mackie_control_protocol.cc
@@ -335,7 +335,7 @@ MackieControlProtocol::get_sorted_stripables()
}
break;
case Selected: // For example: a group (this is USER)
- if (s->presentation_info().selected() && !s->presentation_info().hidden()) {
+ if (s->is_selected() && !s->presentation_info().hidden()) {
sorted.push_back (s);
}
break;
@@ -2038,7 +2038,7 @@ MackieControlProtocol::select_range (uint32_t pressed)
return;
}
- if (stripables.size() == 1 && ControlProtocol::last_selected().size() == 1 && stripables.front()->presentation_info().selected()) {
+ if (stripables.size() == 1 && ControlProtocol::last_selected().size() == 1 && stripables.front()->is_selected()) {
/* cancel selection for one and only selected stripable */
ToggleStripableSelection (stripables.front());
} else {
diff --git a/libs/surfaces/mackie/strip.cc b/libs/surfaces/mackie/strip.cc
index e396af575c..9a570f8227 100644
--- a/libs/surfaces/mackie/strip.cc
+++ b/libs/surfaces/mackie/strip.cc
@@ -380,8 +380,8 @@ Strip::notify_property_changed (const PropertyChange& what_changed)
if (what_changed.contains (ARDOUR::Properties::selected)) {
if (_stripable) {
- _surface->write (_select->set_state (_stripable->presentation_info().selected()));
- _surface->mcp().update_selected (_stripable, _stripable->presentation_info().selected());
+ _surface->write (_select->set_state (_stripable->is_selected()));
+ _surface->mcp().update_selected (_stripable, _stripable->is_selected());
}
}
}
diff --git a/libs/surfaces/osc/osc.cc b/libs/surfaces/osc/osc.cc
index 5fe8e25f41..fae9db11e1 100644
--- a/libs/surfaces/osc/osc.cc
+++ b/libs/surfaces/osc/osc.cc
@@ -3998,17 +3998,13 @@ OSC::get_sorted_stripables(std::bitset<32> types, bool cue)
sorted.push_back (s);
}
}
- } else
- if (types[3] && (s->presentation_info().flags() & PresentationInfo::MidiBus)) {
+ } else if (types[3] && (s->presentation_info().flags() & PresentationInfo::MidiBus)) {
sorted.push_back (s);
- } else
- if (types[4] && (s->presentation_info().flags() & PresentationInfo::VCA)) {
+ } else if (types[4] && (s->presentation_info().flags() & PresentationInfo::VCA)) {
sorted.push_back (s);
- } else
- if (types[8] && (s->presentation_info().flags() & PresentationInfo::Selected)) {
+ } else if (types[8] && (s->is_selected())) {
sorted.push_back (s);
- } else
- if (types[9] && (s->presentation_info().flags() & PresentationInfo::Hidden)) {
+ } else if (types[9] && (s->presentation_info().flags() & PresentationInfo::Hidden)) {
sorted.push_back (s);
}
}
diff --git a/libs/surfaces/push2/mix.cc b/libs/surfaces/push2/mix.cc
index 75b17f8c20..4582cd0d30 100644
--- a/libs/surfaces/push2/mix.cc
+++ b/libs/surfaces/push2/mix.cc
@@ -448,7 +448,7 @@ MixLayout::stripable_property_change (PropertyChange const& what_changed, uint32
if (what_changed.contains (Properties::color)) {
lower_backgrounds[which]->set_fill_color (stripable[which]->presentation_info().color());
- if (stripable[which]->presentation_info().selected()) {
+ if (stripable[which]->is_selected()) {
lower_text[which]->set_fill_color (contrasting_text_color (stripable[which]->presentation_info().color()));
/* might not be a MIDI track, in which case this will
do nothing
@@ -467,7 +467,7 @@ MixLayout::stripable_property_change (PropertyChange const& what_changed, uint32
return;
}
- if (stripable[which]->presentation_info().selected()) {
+ if (stripable[which]->is_selected()) {
show_selection (which);
} else {
hide_selection (which);
@@ -581,7 +581,7 @@ MixLayout::switch_bank (uint32_t base)
stripable[n]->solo_control()->Changed.connect (stripable_connections, invalidator (*this), boost::bind (&MixLayout::solo_changed, this, n), &p2);
stripable[n]->mute_control()->Changed.connect (stripable_connections, invalidator (*this), boost::bind (&MixLayout::mute_changed, this, n), &p2);
- if (stripable[n]->presentation_info().selected()) {
+ if (stripable[n]->is_selected()) {
show_selection (n);
} else {
hide_selection (n);
@@ -671,7 +671,7 @@ MixLayout::button_select_release ()
for (int n = 0; n < 8; ++n) {
if (stripable[n]) {
- if (stripable[n]->presentation_info().selected()) {
+ if (stripable[n]->is_selected()) {
selected = n;
break;
}