"We brake for nobody." oh wait. - fixes Rectified Waveform view.
[ardour.git] / gtk2_ardour / axis_view.cc
index 1144fb1e68c67c13c681df1c1307d58ab7341554..7a449843e09055a306e6b9148eb7a9a6e5752c7b 100644 (file)
 #include <list>
 
 #include "pbd/error.h"
+#include "pbd/convert.h"
 
 #include <gtkmm2ext/utils.h>
 #include <gtkmm2ext/selector.h>
 #include <gtkmm2ext/gtk_ui.h>
 
-#include "ardour/session.h"
-#include "ardour/utils.h"
-
 #include "public_editor.h"
 #include "ardour_ui.h"
 #include "gui_object.h"
@@ -74,18 +72,15 @@ bool
 AxisView::marked_for_display () const
 {
        string const v = gui_property ("visible");
-       return (v == "" || string_is_affirmative (v));
+       return (v == "" || PBD::string_is_affirmative (v));
 }
 
 bool
 AxisView::set_marked_for_display (bool yn)
 {
-       if (yn != marked_for_display()) {
-               if (yn) {
-                       set_gui_property ("visible", true);
-               } else {
-                       set_gui_property ("visible", false);
-               }
+       string const v = gui_property ("visible");
+       if (v == "" || yn != PBD::string_is_affirmative (v)) {
+               set_gui_property ("visible", yn);
                return true; // things changed
        }