diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2016-08-30 21:07:24 +1000 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2017-04-19 09:36:58 +1000 |
commit | 9d2d0ddf00fa91978f2bb14b4dbc195542d46259 (patch) | |
tree | 6de59c826473493841cb4a00b4f961d456c50d78 /gtk2_ardour/axis_view.cc | |
parent | 66004a50366d43e0dca2c9305ec662e037cb17e1 (diff) |
Add AxisView::get_gui_property method, use PBD::string_to<T> for string conversion
Diffstat (limited to 'gtk2_ardour/axis_view.cc')
-rw-r--r-- | gtk2_ardour/axis_view.cc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gtk2_ardour/axis_view.cc b/gtk2_ardour/axis_view.cc index d5f7b46a37..1502c8e1ea 100644 --- a/gtk2_ardour/axis_view.cc +++ b/gtk2_ardour/axis_view.cc @@ -75,6 +75,27 @@ AxisView::gui_property (const string& property_name) const } bool +AxisView::get_gui_property (const std::string& property_name, std::string& value) const +{ + std::string str = gui_property(property_name); + + if (!str.empty()) { + value = str; + return true; + } + + return false; +} + +void +AxisView::set_gui_property (const std::string& property_name, const std::string& value) +{ + property_hashtable.erase (property_name); + property_hashtable.emplace (property_name, value); + gui_object_state ().set_property (state_id (), property_name, value); +} + +bool AxisView::marked_for_display () const { string const v = gui_property ("visible"); |