always compute range for a redirect automation line, even if it will not be drawn...
[ardour.git] / gtk2_ardour / redirect_automation_line.cc
index c1b1ba8aa0303ec42515bff2c9b0768e1634d910..942344a12719812a426f354f23beecbb41acd5f2 100644 (file)
@@ -15,7 +15,6 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-    $Id$
 */
 
 #include "public_editor.h"
@@ -32,8 +31,9 @@
 
 using namespace std;
 using namespace ARDOUR;
+using namespace PBD;
 
-RedirectAutomationLine::RedirectAutomationLine (stringcr_t name, Redirect& rd, uint32_t port, Session& s,
+RedirectAutomationLine::RedirectAutomationLine (const string & name, Redirect& rd, uint32_t port, Session& s,
                                                
                                                TimeAxisView& tv, ArdourCanvas::Group& parent,
                                                
@@ -54,10 +54,11 @@ RedirectAutomationLine::RedirectAutomationLine (stringcr_t name, Redirect& rd, u
                /*NOTREACHED*/
        }
 
-       pi->plugin().get_parameter_descriptor (_port, desc);
+       pi->plugin()->get_parameter_descriptor (_port, desc);
 
        upper = desc.upper;
        lower = desc.lower;
+       range = upper - lower;
 
        if (desc.toggled) {
                no_draw = true;
@@ -65,7 +66,6 @@ RedirectAutomationLine::RedirectAutomationLine (stringcr_t name, Redirect& rd, u
        }
 
        no_draw = false;
-       range = upper - lower;
 
        /* XXX set min/max for underlying curve ??? */
 }