]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiTabular.cpp
Amend f441590c
[lyx.git] / src / frontends / qt4 / GuiTabular.cpp
index 8f1118bc23f4ad3a0d93a75fc4040bbe6c7264b6..495b2c62776aeb9105833791dba734f1bd42064b 100644 (file)
@@ -320,6 +320,10 @@ void GuiTabular::enableWidgets() const
        multirowOffsetLA->setEnabled(enable_mr);
        multirowOffsetED->setEnabled(enable_mr);
        multirowOffsetUnitLC->setEnabled(enable_mr);
+
+       // Vertical lines cannot be set in formal tables
+       borders->setLeftEnabled(!booktabsRB->isChecked());
+       borders->setRightEnabled(!booktabsRB->isChecked());
 }
 
 
@@ -751,7 +755,8 @@ void GuiTabular::paramsToDialog(Inset const * inset)
        // Set width and alignment
 
        Length const tabwidth = tabular.tabularWidth();
-       if (tabwidth.zero())
+       if (tabwidth.zero()
+           && !(tabularWidthED->hasFocus() && tabularWidthED->text() == "0"))
                tabularWidthED->clear();
        else
                lengthToWidgets(tabularWidthED, tabularWidthUnitLC,
@@ -769,7 +774,8 @@ void GuiTabular::paramsToDialog(Inset const * inset)
                pwidth = getColumnPWidth(tabular, cell);
        }
        string colwidth;
-       if (pwidth.zero())
+       if (pwidth.zero()
+           && !(columnWidthED->hasFocus() && columnWidthED->text() == "0"))
                columnWidthED->clear();
        else {
                colwidth = pwidth.asString();
@@ -780,7 +786,8 @@ void GuiTabular::paramsToDialog(Inset const * inset)
        if (multirow)
                mroffset = getMROffset(tabular, cell);
        string offset;
-       if (mroffset.zero())
+       if (mroffset.zero()
+           && !(multirowOffsetED->hasFocus() && multirowOffsetED->text() == "0"))
                multirowOffsetED->clear();
        else {
                offset = mroffset.asString();