]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiTabular.cpp
Fix crash
[lyx.git] / src / frontends / qt4 / GuiTabular.cpp
index 58dcd597a1bcd6e857d3d43290f3c1d8459cbfd7..b021836ac07f39ac5e65e68e354203c90c14b01b 100644 (file)
@@ -45,7 +45,9 @@ namespace lyx {
 namespace frontend {
 
 GuiTabular::GuiTabular(QWidget * parent)
-       : InsetParamsWidget(parent)
+       : InsetParamsWidget(parent), firstheader_suppressable_(false),
+         lastfooter_suppressable_(false)
+
 {
        setupUi(this);
 
@@ -320,6 +322,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());
 }
 
 
@@ -443,8 +449,7 @@ void GuiTabular::setTableAlignment(string & param_str) const
 
 docstring GuiTabular::dialogToParams() const
 {
-       // FIXME: We should use Tabular directly.
-       string param_str = "tabular from-dialog";
+       string param_str = "tabular";
 
        // table width
        string tabwidth = widgetsToLength(tabularWidthED, tabularWidthUnitLC);
@@ -1066,8 +1071,8 @@ bool GuiTabular::checkWidgets(bool readonly) const
 
 bool GuiTabular::funcEnabled(Tabular::Feature f) const
 {
-       string cmd = "tabular " + featureAsString(f);
-       return getStatus(FuncRequest(LFUN_INSET_MODIFY, cmd)).enabled();
+       FuncRequest r(LFUN_INSET_MODIFY, "tabular for-dialog" + featureAsString(f));
+       return getStatus(r).enabled();
 }