From b64d17e9dcaeb84a94095622c93a051e4d93eab7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20St=C3=B6hr?= Date: Tue, 11 Sep 2012 23:51:50 +0200 Subject: [PATCH] GuiTabular.cpp: don't hardcode decimal align combobox item --- src/frontends/qt4/GuiTabular.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontends/qt4/GuiTabular.cpp b/src/frontends/qt4/GuiTabular.cpp index 6c1505a08e..5b70ba129a 100644 --- a/src/frontends/qt4/GuiTabular.cpp +++ b/src/frontends/qt4/GuiTabular.cpp @@ -212,9 +212,9 @@ void GuiTabular::checkEnabled() // 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->removeItem(hAlignCO->findText(qt_("At Decimal Separator"))); 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")); bool const dalign = hAlignCO->itemData(hAlignCO->currentIndex()).toString() == QString("decimal");