summaryrefslogtreecommitdiff
path: root/gtk2_ardour/route_ui.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-06-05 20:50:40 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2016-06-05 20:50:57 -0400
commit01812f53c34bf0298430da42bc636ee29dcdfd6a (patch)
tree9224019f8db18c66b03e7b26143079faa4186275 /gtk2_ardour/route_ui.cc
parent2c0396c9aa762be226d154cc3ed201c39ff6a2ec (diff)
use, or mostly use PresentationInfo for selection status of Routes.
Needs extension to Surfaces, replacing GuiSelectionChanged signal concept
Diffstat (limited to 'gtk2_ardour/route_ui.cc')
-rw-r--r--gtk2_ardour/route_ui.cc33
1 files changed, 27 insertions, 6 deletions
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc
index c6a1677cc0..3cb96c29f4 100644
--- a/gtk2_ardour/route_ui.cc
+++ b/gtk2_ardour/route_ui.cc
@@ -2172,6 +2172,33 @@ RouteUI::route_gui_changed (PropertyChange const& what_changed)
route_color_changed ();
}
}
+
+ if (what_changed.contains (Properties::selected)) {
+ show_selected ();
+ }
+}
+
+void
+RouteUI::set_selected (bool yn)
+{
+ Selectable::set_selected (yn);
+ if (_route) {
+ _route->presentation_info().set_selected (yn);
+ }
+}
+
+bool
+RouteUI::selected () const
+{
+ /* XXX not sure if this is a wise design. Probably don't really want
+ * the cached _selected value from Selectable.
+ */
+
+ if (!_route) {
+ return _selected;
+ }
+
+ return _route->presentation_info().selected();
}
void
@@ -2322,12 +2349,6 @@ RouteUI::manage_pins ()
}
}
-void
-RouteUI::set_selected (bool yn)
-{
- _route->presentation_info().set_selected (yn);
-}
-
bool
RouteUI::mark_hidden (bool yn)
{