]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiTabular.cpp
On Linux show in crash message box the backtrace
[lyx.git] / src / frontends / qt4 / GuiTabular.cpp
index ee4d1dfe7bb1d591aabee514c0e3d9934bd90b76..312b14fd874b0639e06be08b0158e5871db3de55 100644 (file)
@@ -127,7 +127,7 @@ GuiTabular::GuiTabular(QWidget * parent)
                this, SLOT(checkEnabled()));
        connect(captionStatusCB, SIGNAL(clicked()),
                this, SLOT(checkEnabled()));
-       connect(specialAlignmentED, SIGNAL(editingFinished()),
+       connect(specialAlignmentED, SIGNAL(textEdited(const QString &)),
                this, SLOT(checkEnabled()));
        connect(columnWidthED, SIGNAL(textEdited(const QString &)),
                this, SLOT(checkEnabled()));
@@ -204,6 +204,7 @@ void GuiTabular::checkEnabled()
        // if there is a LaTeX argument, the width and alignment will be overwritten
        // therefore disable them in this case
        columnWidthED->setEnabled(specialAlignmentED->text().isEmpty());
+       columnWidthUnitLC->setEnabled(specialAlignmentED->text().isEmpty());
        // if the column has a width, multirows are always left-aligned
        // therefore disable hAlignCB in this case
        hAlignCO->setEnabled(!(multirowCB->isChecked()
@@ -211,10 +212,10 @@ void GuiTabular::checkEnabled()
                && specialAlignmentED->text().isEmpty());
        // decimal alignment is only possible for non-multicol and non-multirow cells
        if ((multicolumnCB->isChecked() || multirowCB->isChecked())
-               && hAlignCO->findText(qt_("At Decimal Separator")))
-               hAlignCO->removeItem(3);
+               && hAlignCO->findData(toqstr("decimal")))
+               hAlignCO->removeItem(hAlignCO->findData(toqstr("decimal")));
        else if (!multicolumnCB->isChecked() && !multirowCB->isChecked()
-               && !hAlignCO->findText(qt_("At Decimal Separator")))
+               && hAlignCO->findData(toqstr("decimal")) == -1)
                hAlignCO->addItem(qt_("At Decimal Separator"), toqstr("decimal"));
        bool const dalign = 
                hAlignCO->itemData(hAlignCO->currentIndex()).toString() == QString("decimal");
@@ -311,8 +312,10 @@ void GuiTabular::checkEnabled()
        captionStatusCB->setEnabled(funcEnabled(Tabular::TOGGLE_LTCAPTION)
                && longtabular);
 
-       multicolumnCB->setEnabled(funcEnabled(Tabular::MULTICOLUMN) && !dalign);
-       multirowCB->setEnabled(funcEnabled(Tabular::MULTIROW) && !dalign);
+       multicolumnCB->setEnabled(funcEnabled(Tabular::MULTICOLUMN)
+               && !dalign && !multirowCB->isChecked());
+       multirowCB->setEnabled(funcEnabled(Tabular::MULTIROW)
+               && !dalign && !multicolumnCB->isChecked());
        bool const enable_mr = multirowCB->isChecked();
        multirowOffsetLA->setEnabled(enable_mr);
        multirowOffsetED->setEnabled(enable_mr);