docstring GuiLine::dialogToParams() const
{
InsetCommandParams params(insetCode());
- params["offset"] = from_utf8(widgetsToLength(OffsetLE, OffsetUnitCO));;
+ params["offset"] = from_utf8(widgetsToLength(OffsetLE, OffsetUnitCO));
params["width"] = from_utf8(widgetsToLength(WidthLE, WidthUnitCO));
params["height"] = from_utf8(widgetsToLength(HeightLE, HeightUnitCO));
params.setCmdName("rule");
- return from_ascii(InsetLine::params2string("line", params));
+ return from_ascii(InsetLine::params2string(params));
}
}
-bool GuiLine::checkWidgets() const
+bool GuiLine::checkWidgets(bool readonly) const
{
+ WidthLE->setReadOnly(readonly);
+ HeightLE->setReadOnly(readonly);
+ OffsetLE->setReadOnly(readonly);
+ OffsetUnitCO->setEnabled(!readonly);
+ HeightUnitCO->setEnabled(!readonly);
+ WidthUnitCO->setEnabled(!readonly);
if (!InsetParamsWidget::checkWidgets())
return false;
// FIXME: this should be handled in unsignedGlueLengthValidator!