Bug 384100 - [Resize Canvas dialog] numeric entries with [fr] local bugs the "math feature"
Summary: [Resize Canvas dialog] numeric entries with [fr] local bugs the "math feature"
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Usability (other bugs)
Version First Reported In: 3.2.1
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Paragon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-28 10:10 UTC by David REVOY
Modified: 2017-08-31 20:30 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: f8ce5860da778c20859f88e53b322c7e350bb75c
Sentry Crash Report:


Attachments
5 second Gif screencapture to show the behavior. (427.23 KB, image/gif)
2017-08-28 10:10 UTC, David REVOY
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David REVOY 2017-08-28 10:10:55 UTC
Created attachment 107559 [details]
5 second Gif screencapture to show the behavior.

Hi,

I'm testing the possibility to enter math expressions in the numeric field of Krita. But it doesn't work: because the system don't understand the number written with my local system settings (eg. French 0,5 instead of English 0.5 ). The results: doing math is really hard and even changing a simple number in Krita UI is now difficult, because I need to change constantly all "," with "." .  I attach a quick screen-capture to show you the behavior on a [fr-local] system.

## What I'm trying to perform in this quick test:
I'm trying to extend 0,5cm around a canvas with the Resize Canvas dialog.
- I open an artwork
- I go to Image → Resize Canvas
- I switch the size expressed in "Pixels" to "Centimeters"
- I enter "+0,5" in the field to perform a math expression
- I press enter key

## Result
1) The dialog auto-close: pressing "enter key" in this dialog validate the whole "Resize Canvas" dialog. It's a problem. Workaround: I need to click another field of the dialog to get the result of my math expression...

2) A red /!\ warning appears in the field: I understand something is wrong. But my math expression is correct. I try with space. Nothing. I try with a equal symbol at the end? Nothing. I finally understand: I replace all "," by "." and it works. But weirdly; the result appears as french local with a "," decimal separator...

## What I would like
Being able to enter math expression and numbers in general with my local settings (eg. 0,45+0,5 , or simply 0,45 alone) press [enter key] and get the result in the box.

I hope it will be easy to fix
Comment 1 Paragon 2017-08-31 18:48:03 UTC
The fix was already in Master, but apparently it hasn't been taken into the 3.2 branch. I've cherry picked what is needed, in next release it should be fixed.
Comment 2 David REVOY 2017-08-31 20:30:02 UTC
Hi @Paragon , thank you for the fix, the backport and sorry for the noise then :) it will remind me to also test bugs in git~master before reporting for a stable build appimage.