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