X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Faxis_view.cc;h=d5f7b46a37cea9ea9015cfa54bbcde8419ff01a6;hb=71003b02353ea090902bdd5623d42da141fa25ad;hp=5e36fc43c1e5a7bc04a4dcdeb38b0cf899c04eb1;hpb=fd7cddb847639b28bbeaf72d5b613833761efe6f;p=ardour.git diff --git a/gtk2_ardour/axis_view.cc b/gtk2_ardour/axis_view.cc index 5e36fc43c1..d5f7b46a37 100644 --- a/gtk2_ardour/axis_view.cc +++ b/gtk2_ardour/axis_view.cc @@ -37,7 +37,7 @@ #include "gui_object.h" #include "axis_view.h" #include "utils.h" -#include "i18n.h" +#include "pbd/i18n.h" using namespace std; using namespace Gtk; @@ -47,10 +47,8 @@ using namespace ARDOUR_UI_UTILS; list AxisView::used_colors; -AxisView::AxisView (ARDOUR::Session* sess) - : SessionHandlePtr (sess) +AxisView::AxisView () { - _selected = false; } AxisView::~AxisView() @@ -69,7 +67,7 @@ AxisView::gui_property (const string& property_name) const if (property_hashtable.count(property_name)) { return property_hashtable[property_name]; } else { - string rv = gui_object_state().get_string (state_id(), property_name); + string rv = gui_object_state().get_string (state_id(), property_name); property_hashtable.erase(property_name); property_hashtable.emplace(property_name, rv); return rv; @@ -95,7 +93,23 @@ AxisView::set_marked_for_display (bool yn) } GUIObjectState& -AxisView::gui_object_state() +AxisView::gui_object_state() { return *ARDOUR_UI::instance()->gui_object_state; } + +void +AxisView::set_selected (bool yn) +{ + if (selected() == yn) { + return; + } + + Selectable::set_selected (yn); + + boost::shared_ptr s = stripable (); + + if (s) { + s->presentation_info().set_selected (yn); + } +}