From 0e92aee0b1ebc41c8475dea2548df63ffe82e4a0 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 5 Dec 2011 18:14:20 +0000 Subject: provide sensible default step and page sizes for AutomationControllers based on parameter max and min values (used to 1.0 for step and 0 for page) git-svn-id: svn://localhost/ardour2/branches/3.0@10902 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/automation_controller.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gtk2_ardour/automation_controller.cc') diff --git a/gtk2_ardour/automation_controller.cc b/gtk2_ardour/automation_controller.cc index 79aec89f9c..9a06b91da5 100644 --- a/gtk2_ardour/automation_controller.cc +++ b/gtk2_ardour/automation_controller.cc @@ -76,7 +76,10 @@ AutomationController::create( const Evoral::Parameter& param, boost::shared_ptr 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(new AutomationController(printer, ac, adjustment)); -- cgit v1.2.3