We have moved to a new Sailfish OS Forum. Please start new discussions there.
11

Copying values in calculator mixes up decimal separator and digit group separator

Tracked by Jolla (In release)

asked 2018-06-12 00:36:27 +0200

Gestra gravatar image

updated 2018-06-12 00:40:14 +0200

How to reproduce:

In calculator, type in 1337= This gives you a result of 1,337. Now press and hold on the result and select copy. When you hit paste, instead of 1,337 you get 1.337 (one point three three seven instead of one thousand three hundred and thirty seven).

Running on Xperia X with Sailfish 2.2.0.29. Language is set to English (UK) in case that makes a difference in how the decimal separator is handled.

edit retag flag offensive close delete

Comments

1

Error is still there in 3.3.016

AkiBerlin ( 2020-06-15 13:23:22 +0200 )edit

Maybe the problem depends on language setting. Some have colon as 1,000 seperator, others have dot as 1.000 would be correct. So maybe cooy or paste does not respect the language setting

SaimenSays ( 2020-06-17 10:30:09 +0200 )edit

@SaimenSays Number presentation of the input is one problem, the other is that Calculator copies the shown result string to Clipboard, not the value.

hsjpekka ( 2020-06-17 16:44:13 +0200 )edit

@hsjpekka
but that is only half of the mess :)
The string should then not convert a comma into a dot, or?

Love your patch!

peterleinchen ( 2020-06-17 21:21:28 +0200 )edit

1 Answer

Sort by » oldest newest most voted
3

answered 2020-06-17 01:35:28 +0200

hsjpekka gravatar image

Long press & copy copies the result as string. But tapping the result copies the value. At least in my phone.

There is also patch Calculator result copying in patchmanager3, that copies the value in stead of the string. The problem is in /usr/share/jolla-calculator/pages/CalculationsListView.qml on line ~28:

onClicked: Clipboard.text = calculation.result.valueText

copies the value as string, but

onClicked: Clipboard.text = calculation.result.value

would copy the value.

edit flag offensive delete publish link more

Comments

Thanks for that finding!

Funny thing with this calculator is also
if you multiply 1e+308 by itself (or just by 10) you get a result shown as text where as copying the value gives you infinity! :)

peterleinchen ( 2020-06-17 10:09:23 +0200 )edit

.

Long press & copy copies the result as string. 
But tapping the result copies the value. At least in my phone.

First sentence is true for clipboard.
Second one is valid inside the calculator only, right?

peterleinchen ( 2020-06-17 10:14:16 +0200 )edit
1

Yes. Tapping works in Calculator only.

hsjpekka ( 2020-06-17 16:47:44 +0200 )edit
Login/Signup to Answer

Question tools

Follow
3 followers

Stats

Asked: 2018-06-12 00:36:27 +0200

Seen: 389 times

Last updated: Jun 17 '20