13
0

gtk interface update for controller step/page size

This commit is contained in:
Robin Gareus 2014-11-30 15:04:56 +01:00
parent 18efe8f446
commit 4d4c20b8cc

View File

@ -129,13 +129,16 @@ AutomationController::create(boost::shared_ptr<Automatable> printer,
double smallstep = desc.smallstep;
double largestep = desc.largestep;
if (smallstep == 0.0) {
smallstep = (up - lo) / 100;
smallstep = up / 1000.;
} else {
smallstep = ac->internal_to_interface(desc.lower + smallstep);
}
if (largestep == 0.0) {
largestep = (up - lo) / 10;
largestep = up / 40.;
} else {
largestep = ac->internal_to_interface(desc.lower + largestep);
}
smallstep = ac->internal_to_interface(smallstep);
largestep = ac->internal_to_interface(largestep);
Gtk::Adjustment* adjustment = manage (
new Gtk::Adjustment (normal, lo, up, smallstep, largestep));