diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-12-05 18:14:20 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-12-05 18:14:20 +0000 |
commit | 0e92aee0b1ebc41c8475dea2548df63ffe82e4a0 (patch) | |
tree | e94fd6a602660f59579ae9e4b7117ca96f7ad0c9 /gtk2_ardour/automation_controller.cc | |
parent | 5547744d85aa38e1e054f90cf4ea2414e65a79b8 (diff) |
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
Diffstat (limited to 'gtk2_ardour/automation_controller.cc')
-rw-r--r-- | gtk2_ardour/automation_controller.cc | 5 |
1 files changed, 4 insertions, 1 deletions
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<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)); |