diff --git a/kcalc.cpp b/kcalc.cpp --- a/kcalc.cpp +++ b/kcalc.cpp @@ -1543,17 +1543,14 @@ if(KCalcConstButton *btn = qobject_cast(const_buttons_[button])) { if (!shift_mode_) { // set the display to the configured value of constant button - // internally, we deal with C locale style numbers, we need to convert QString val = btn->constant(); - val.replace(QLatin1Char('.'), KNumber::decimalSeparator()); + if (KCalcSettings::groupDigits() && !(QLocale().numberOptions() & QLocale::OmitGroupSeparator)) + val.remove(KNumber::groupSeparator()); calc_display->setAmount(KNumber(val)); - } else { pbShift->setChecked(false); - // internally, we deal with C locale style numbers, we need to convert QString val = calc_display->text(); - val.replace(KNumber::decimalSeparator(), QLatin1String(".")); KCalcSettings::setValueConstant(button, val); // below set new tooltip