Mac VST-2.x support
[ardour.git] / libs / ardour / pannable.cc
index ebf3115658c927278b976fecf2690651fd51c89f..abfb9d66c2e3aa80457dc90cd849791ccfc92fb3 100644 (file)
@@ -30,7 +30,7 @@
 #include "ardour/pan_controllable.h"
 #include "ardour/session.h"
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace std;
 using namespace PBD;
@@ -107,6 +107,12 @@ Pannable::set_panner (boost::shared_ptr<Panner> p)
 void
 Pannable::value_changed ()
 {
+       if (!has_state ()) {
+               // prevent the GUI from resetting panners
+               // e.g. when switching to aux-sends and back.
+               _has_state = true;
+       }
+
        _session.set_dirty ();
 }
 
@@ -275,7 +281,7 @@ Pannable::set_state (const XMLNode& root, int version)
 }
 
 string
-Pannable::value_as_string (boost::shared_ptr<AutomationControl> ac) const
+Pannable::value_as_string (boost::shared_ptr<const AutomationControl> ac) const
 {
        boost::shared_ptr<Panner> p = panner ();