summaryrefslogtreecommitdiff
path: root/gtk2_ardour/axis_view.h
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2020-02-28 02:25:57 +0100
committerRobin Gareus <robin@gareus.org>2020-02-28 02:25:57 +0100
commit1af5f37e4698c2e3c0edf195c23734834d426ea0 (patch)
treeeeef3bc527b487066a0314123cfe0b422cb71dd8 /gtk2_ardour/axis_view.h
parent73c5bdd3cb08ad0888fafe2f4018c3f2a575340c (diff)
Restore visible automation lanes (#7914)
On session re-load only automation lanes with events were displayed, regardless of visibility state. This allowed for inconsistent state (menu showed them as visible even if they were not).
Diffstat (limited to 'gtk2_ardour/axis_view.h')
-rw-r--r--gtk2_ardour/axis_view.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/gtk2_ardour/axis_view.h b/gtk2_ardour/axis_view.h
index 1a1686add9..e1db192b7e 100644
--- a/gtk2_ardour/axis_view.h
+++ b/gtk2_ardour/axis_view.h
@@ -83,6 +83,18 @@ public:
return false;
}
+ template <typename T>
+ bool get_gui_property (const std::string& state_id, const std::string& property_name, T& value) const
+ {
+ std::string str = gui_object_state().get_string (state_id, property_name);
+
+ if (!str.empty ()) {
+ return PBD::string_to<T>(str, value);
+ }
+ return false;
+ }
+
+
void set_gui_property (const std::string& property_name, const std::string& value);
void remove_gui_property (const std::string& property_name);