GuiTabular.cpp: don't hardcode decimal align combobox item

This commit is contained in:
Uwe Stöhr 2012-09-11 23:51:50 +02:00
parent 6f157533a1
commit b64d17e9dc

View File

@ -212,9 +212,9 @@ void GuiTabular::checkEnabled()
// decimal alignment is only possible for non-multicol and non-multirow cells // decimal alignment is only possible for non-multicol and non-multirow cells
if ((multicolumnCB->isChecked() || multirowCB->isChecked()) if ((multicolumnCB->isChecked() || multirowCB->isChecked())
&& hAlignCO->findText(qt_("At Decimal Separator"))) && hAlignCO->findText(qt_("At Decimal Separator")))
hAlignCO->removeItem(3); hAlignCO->removeItem(hAlignCO->findText(qt_("At Decimal Separator")));
else if (!multicolumnCB->isChecked() && !multirowCB->isChecked() else if (!multicolumnCB->isChecked() && !multirowCB->isChecked()
&& !hAlignCO->findText(qt_("At Decimal Separator"))) && hAlignCO->findText(qt_("At Decimal Separator")) == -1)
hAlignCO->addItem(qt_("At Decimal Separator"), toqstr("decimal")); hAlignCO->addItem(qt_("At Decimal Separator"), toqstr("decimal"));
bool const dalign = bool const dalign =
hAlignCO->itemData(hAlignCO->currentIndex()).toString() == QString("decimal"); hAlignCO->itemData(hAlignCO->currentIndex()).toString() == QString("decimal");