Fix bug #6070: Width unit cannot be set in tabular dialog.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30622 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2009-07-16 07:47:02 +00:00
parent a333697538
commit 0dd2067a8f

View File

@ -53,6 +53,8 @@ GuiTabular::GuiTabular(GuiView & lv)
bottomspaceED->setValidator(new LengthValidator(bottomspaceED)); bottomspaceED->setValidator(new LengthValidator(bottomspaceED));
interlinespaceED->setValidator(new LengthValidator(interlinespaceED)); interlinespaceED->setValidator(new LengthValidator(interlinespaceED));
widthUnitCB->setCurrentItem(Length::defaultUnit());
connect(topspaceED, SIGNAL(returnPressed()), connect(topspaceED, SIGNAL(returnPressed()),
this, SLOT(topspace_changed())); this, SLOT(topspace_changed()));
connect(topspaceUnit, SIGNAL(selectionChanged(lyx::Length::UNIT)), connect(topspaceUnit, SIGNAL(selectionChanged(lyx::Length::UNIT)),
@ -770,10 +772,12 @@ void GuiTabular::updateContents()
interlinespaceCO->setEnabled(!isReadonly); interlinespaceCO->setEnabled(!isReadonly);
string colwidth; string colwidth;
if (!pwidth.zero()) if (!pwidth.zero()) {
colwidth = pwidth.asString(); colwidth = pwidth.asString();
lengthToWidgets(widthED, widthUnitCB,
colwidth, default_unit); lengthToWidgets(widthED, widthUnitCB,
colwidth, default_unit);
}
widthED->setEnabled(!isReadonly); widthED->setEnabled(!isReadonly);
widthUnitCB->setEnabled(!isReadonly); widthUnitCB->setEnabled(!isReadonly);