provide sensible default step and page sizes for AutomationControllers based on param...
authorPaul Davis <paul@linuxaudiosystems.com>
Mon, 5 Dec 2011 18:14:20 +0000 (18:14 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 5 Dec 2011 18:14:20 +0000 (18:14 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@10902 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/automation_controller.cc

index 79aec89f9c3bfbfe93c9dadbad3fdb46351b1d62..9a06b91da595786a8c563512f17cfb1228acf41d 100644 (file)
@@ -76,7 +76,10 @@ AutomationController::create(
                const Evoral::Parameter& param,
                boost::shared_ptr<AutomationControl> ac)
 {
-       Gtk::Adjustment* adjustment = manage (new Gtk::Adjustment (param.normal(), param.min(), param.max()));
+       Gtk::Adjustment* adjustment = manage (new Gtk::Adjustment (param.normal(), param.min(), param.max(),
+                                                                  (param.max() - param.min())/100.0,
+                                                                  (param.max() - param.min())/10.0));
+
         assert (ac);
         assert(ac->parameter() == param);
        return boost::shared_ptr<AutomationController>(new AutomationController(printer, ac, adjustment));