{"action":"closed","issue":{"url":"https://api.github.com/repos/markummitchell/engauge6/issues/51","labels_url":"https://api.github.com/repos/markummitchell/engauge6/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/markummitchell/engauge6/issues/51/comments","events_url":"https://api.github.com/repos/markummitchell/engauge6/issues/51/events","html_url":"https://github.com/markummitchell/engauge6/issues/51","id":126770001,"number":51,"title":"Comma as decimal point not handled correctly","user":{"login":"VegarS","id":1231463,"avatar_url":"https://avatars.githubusercontent.com/u/1231463?v=3","gravatar_id":"","url":"https://api.github.com/users/VegarS","html_url":"https://github.com/VegarS","followers_url":"https://api.github.com/users/VegarS/followers","following_url":"https://api.github.com/users/VegarS/following{/other_user}","gists_url":"https://api.github.com/users/VegarS/gists{/gist_id}","starred_url":"https://api.github.com/users/VegarS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VegarS/subscriptions","organizations_url":"https://api.github.com/users/VegarS/orgs","repos_url":"https://api.github.com/users/VegarS/repos","events_url":"https://api.github.com/users/VegarS/events{/privacy}","received_events_url":"https://api.github.com/users/VegarS/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-14T23:11:39Z","updated_at":"2016-01-20T05:00:15Z","closed_at":"2016-01-20T05:00:15Z","body":"Certain locales (e.g. Norwegian, German) use comma as the decimal separator (1.23 is written as 1,23). This is not handled correctly by the axis point tool, the string 1,23 is converted to 1.0.\r\n\r\nAs the validator for the lineedits in the axis point dialog recognises that my locale's decimal point is comma, I am not allowed to manually enter a dot instead, severly limiting the usability of the tool.\r\n\r\nIt seems QString::toDouble is always using the C locale since Qt5, so the fix is to use QLocale::toDouble instead of QString::toDouble. \r\n\r\nI fixed this for the axis point tool (at least for cartesian coordinates) by editing src/Format/FormatCoordsUnitsStrategyNonPolarTheta.cpp, in FormatCoordsUnitsStrategyNonPolarTheta::formattedToUnformatted(), on line 42:\r\n\r\n`value = string.toDouble ();`\r\nshould be replaced by\r\n`value = QLocale::system().toDouble(string);`\r\n\r\nThis is a potential issue elsewhere in the program as well, especially where user input is handled."}}