diff options
Diffstat (limited to 'kcalc/kcalcdisplay.cpp')
-rw-r--r-- | kcalc/kcalcdisplay.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kcalc/kcalcdisplay.cpp b/kcalc/kcalcdisplay.cpp index 1c620b0..1dac94f 100644 --- a/kcalc/kcalcdisplay.cpp +++ b/kcalc/kcalcdisplay.cpp @@ -102,7 +102,8 @@ void KCalcDisplay::slotCut(void) void KCalcDisplay::slotCopy(void) { - TQString txt = TQLabel::text(); + TQString txt = (_num_base == NB_DECIMAL && KCalcSettings::copyToBufNoLocale()) ? + _display_amount.toTQString(KCalcSettings::precision(), _fixed_precision) : TQLabel::text(); if (_num_base == NB_HEX) txt.prepend( "0x" ); (TQApplication::clipboard())->setText(txt, TQClipboard::Clipboard); @@ -142,6 +143,8 @@ void KCalcDisplay::slotPaste(bool bClipboard) } else // _num_base == NB_DECIMAL && ! tmp_str.startsWith("0x", false) { + tmp_str.replace(" ", "").replace(",", "."); //Normalization from the most localized numbers + setAmount(KNumber(tmp_str)); if (_beep && _display_amount == KNumber::NotDefined) KNotifyClient::beep(); |