From 3776d8ec89c90ef14892dcac1a26143634d042a3 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Fri, 19 Feb 2010 10:25:20 +0000 Subject: [PATCH] Fix cell width initial fill-in. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33508 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiTabular.cpp | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/frontends/qt4/GuiTabular.cpp b/src/frontends/qt4/GuiTabular.cpp index 4045ece427..0acad38908 100644 --- a/src/frontends/qt4/GuiTabular.cpp +++ b/src/frontends/qt4/GuiTabular.cpp @@ -561,9 +561,12 @@ void GuiTabular::paramsToDialog(Inset const * inset) // repaint the setborder widget borders->update(); + Length::UNIT const default_unit = Length::defaultUnit(); + + /////////////////////////////////// + // Set width and alignment Length pwidth; docstring special; - if (multicol) { special = getAlignSpecial(tabular, cell, Tabular::SET_SPECIAL_MULTICOLUMN); @@ -577,10 +580,17 @@ void GuiTabular::paramsToDialog(Inset const * inset) Tabular::SET_SPECIAL_COLUMN); pwidth = getColumnPWidth(tabular, cell); } - + string colwidth; + if (pwidth.zero()) + widthED->clear(); + else { + colwidth = pwidth.asString(); + lengthToWidgets(widthED, widthUnitCB, + colwidth, default_unit); + } specialAlignmentED->setText(toqstr(special)); + /////////////////////////////////// - Length::UNIT const default_unit = Length::defaultUnit(); borderDefaultRB->setChecked(!tabular.use_booktabs); booktabsRB->setChecked(tabular.use_booktabs); @@ -623,13 +633,6 @@ void GuiTabular::paramsToDialog(Inset const * inset) tabular.row_info[row].interline_space.asString(), default_unit); } - string colwidth; - if (!pwidth.zero()) { - colwidth = pwidth.asString(); - - lengthToWidgets(widthED, widthUnitCB, - colwidth, default_unit); - } hAlignCB->clear(); hAlignCB->addItem(qt_("Left")); -- 2.39.2