From 237cb51fb15fdaa4951f70e393eea0fdfe6392b3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Mon, 24 Sep 2012 02:10:21 +0200 Subject: [PATCH] GuiTabular.cpp: don't rely on a string but on the combobox data It was not safe in changeset 9d05ac5c to search for a text because it can be translated, better search for the data, thanks Pavel for spotting --- src/frontends/qt4/GuiTabular.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/frontends/qt4/GuiTabular.cpp b/src/frontends/qt4/GuiTabular.cpp index 5b70ba129a..6f4dc06cec 100644 --- a/src/frontends/qt4/GuiTabular.cpp +++ b/src/frontends/qt4/GuiTabular.cpp @@ -211,10 +211,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(hAlignCO->findText(qt_("At Decimal Separator"))); + && hAlignCO->findData(toqstr("decimal"))) + hAlignCO->removeItem(hAlignCO->findData(toqstr("decimal"))); else if (!multicolumnCB->isChecked() && !multirowCB->isChecked() - && hAlignCO->findText(qt_("At Decimal Separator")) == -1) + && hAlignCO->findData(toqstr("decimal")) == -1) hAlignCO->addItem(qt_("At Decimal Separator"), toqstr("decimal")); bool const dalign = hAlignCO->itemData(hAlignCO->currentIndex()).toString() == QString("decimal"); -- 2.39.2