// the width can only be selected for makebox or framebox
widthCB->setEnabled(itype == "makebox"
|| (outer == "Boxed" && itype == "none"));
- widthCB->setChecked(itype != "none" && !widthCB->isEnabled());
+ widthCB->setChecked(!widthED->text().isEmpty());
// except for frameless and boxed, the width cannot be specified if
// there is no inner box
bool const width_enabled =
lengthToWidgets(widthED, widthUnitsLC,
params.width, default_unit);
} else {
- if (widthCB->isEnabled())
- widthCB->setChecked(true);
+ widthCB->setChecked(true);
lengthToWidgets(widthED, widthUnitsLC,
params.width, default_unit);
QString const special = toqstr(params.special);
params.width = Length(value.toDouble(), Length::IN);
} else {
params.special = "none";
+ // we must specify a valid length in this case
+ if (value.isEmpty())
+ widthED->setText("0");
params.width = Length(widgetsToLength(widthED, widthUnitsLC));
}
} else {