connect(fillPatternCO, SIGNAL(activated(int)),
this, SLOT(patternChanged()));
- valueLE->setValidator(unsignedLengthValidator(valueLE));
+ if (params_.math)
+ valueLE->setValidator(unsignedLengthValidator(valueLE));
+ else
+ valueLE->setValidator(unsignedGlueLengthValidator(valueLE));
// Manage the ok, apply, restore and cancel/close buttons
bc().setPolicy(ButtonPolicy::OkApplyCancelReadOnlyPolicy);
// initialize the length validator
bc().addCheckedLineEdit(valueLE, valueL);
-
- // remove the %-items from the unit choice
- unitCO->noPercents();
}
keep->setChecked(protect);
Length::UNIT const default_unit = Length::defaultUnit();
- if (item == (params.math ? 9 : 7))
- lengthToWidgets(value, unit, params.length, default_unit);
- else
+ if (item == (params.math ? 9 : 7)) {
+ string length = params.length.asString();
+ lengthToWidgets(value, unit, length, default_unit);
+ } else
lengthToWidgets(value, unit, "", default_unit);
}
case 8: params.kind = InsetSpaceParams::QQUAD; break;
case 9:
params.kind = InsetSpaceParams::CUSTOM;
- params.length = Length(widgetsToLength(value, unit));
+ params.length = GlueLength(widgetsToLength(value, unit));
break;
}
return params;
params.kind = InsetSpaceParams::CUSTOM_PROTECTED;
else
params.kind = InsetSpaceParams::CUSTOM;
- params.length = Length(widgetsToLength(value, unit));
+ params.length = GlueLength(widgetsToLength(value, unit));
break;
}
return params;