Bug 442853

Summary: Seexpr widgets no longer respect the range (regression in 4.4.3)
Product: [Frameworks and Libraries] SeExpr Reporter: Tiar <tamtamy.tymona>
Component: GeneralAssignee: amyspark <amy>
Status: RESOLVED FIXED    
Severity: normal CC: amy
Priority: NOR Keywords: regression
Version: unspecified   
Target Milestone: ---   
Platform: Mint (Ubuntu based)   
OS: Linux   
Latest Commit: Version Fixed In:

Description Tiar 2021-09-23 17:29:15 UTC
SUMMARY
In Seexpr in the comment you can write a range for the value if you want the user to have an easy time choosing a value from that range.
However in 4.4.3 and later, this is no longer possible and all values are perceived to be in range 0-1, which is really troublesome for setting bigger values (the user needs to enter it directly instead of using the slider).

SCRIPT:
$xDiff = 100; # 0, 500
$color = [0, 0, 0];
$color


STEPS TO REPRODUCE
1. Open Krita 4.4.1 and Krita 4.4.3.
2. Paste this script to the Seexpr dialog into the script area.
3. Look at the slider widget (labeled "xDiff") and move the value indicator around.

OBSERVED RESULT
In Krita 4.4.3, there is a slider with the value indicator at the very end of the slider and if you move it, you will only get values between 0 and 1.

EXPECTED RESULT
Like in Krita 4.4.1: the is a slider with the value indicator at 1/5 of the slider, and if you move it, you will get values between 0 and 500.

NOTE:
This bug is still relevant in current master (a3676628e3) with the current master of kseexpr (bff3da7, 4.0.3.0).

Also I'm not sure, maybe it should be reported to KSeExpr instead?

SOFTWARE/OS VERSIONS
Krita

 Version: 4.4.3
 Languages: en_US, en, en_US, en, en_US, en, pl_PL, pl, pl_PL, pl
 Hidpi: true

Qt

  Version (compiled): 5.12.9
  Version (loaded): 5.12.9
Comment 1 amyspark 2021-10-01 14:38:55 UTC
It's a typo in the comment parsing refactor I did a while ago. It will be addressed as part of https://invent.kde.org/graphics/krita/-/merge_requests/1071.
Comment 2 amyspark 2021-10-19 16:15:58 UTC
Git commit 413f0f1121f730c6dd5154760bb0515ec864f53c by L. E. Segovia.
Committed on 19/10/2021 at 16:11.
Pushed by lsegovia into branch 'master'.

SeExpr: fix typo in range comment parsing

M  +1    -1    3rdparty/ext_seexpr/0001-Do-not-look-LLVM-up-unless-explicitly-enabled.patch
M  +1    -1    3rdparty/ext_seexpr/0002-Reject-malformed-curve-and-ccurve-calls-at-parse-tim.patch
M  +2    -2    3rdparty/ext_seexpr/0003-ExprEditor-replace-index-for-line-column-when-report.patch
A  +87   -0    3rdparty/ext_seexpr/0004-Fix-copy-paste-typo-in-range-comment-parsing.patch
M  +1    -0    3rdparty/ext_seexpr/CMakeLists.txt

https://invent.kde.org/graphics/krita/commit/413f0f1121f730c6dd5154760bb0515ec864f53c
Comment 3 amyspark 2021-10-19 16:20:14 UTC
Git commit ddcf0663f7a907bfbcc6a19f8a0e7f08dd6d0595 by L. E. Segovia.
Committed on 19/10/2021 at 16:19.
Pushed by lsegovia into branch 'krita/5.0'.

SeExpr: fix typo in range comment parsing
(cherry picked from commit 413f0f1121f730c6dd5154760bb0515ec864f53c)

M  +1    -1    3rdparty/ext_seexpr/0001-Do-not-look-LLVM-up-unless-explicitly-enabled.patch
M  +1    -1    3rdparty/ext_seexpr/0002-Reject-malformed-curve-and-ccurve-calls-at-parse-tim.patch
M  +2    -2    3rdparty/ext_seexpr/0003-ExprEditor-replace-index-for-line-column-when-report.patch
A  +87   -0    3rdparty/ext_seexpr/0004-Fix-copy-paste-typo-in-range-comment-parsing.patch
M  +1    -0    3rdparty/ext_seexpr/CMakeLists.txt

https://invent.kde.org/graphics/krita/commit/ddcf0663f7a907bfbcc6a19f8a0e7f08dd6d0595
Comment 4 amyspark 2021-12-14 16:02:02 UTC
Git commit 9e803a664ff501d85d4de1fca042028ee5887b0e by L. E. Segovia.
Committed on 01/10/2021 at 14:35.
Pushed by lsegovia into branch 'master'.

Fix copy-paste typo in range comment parsing

M  +2    -2    src/KSeExprUI/ControlSpec.cpp
M  +8    -7    src/KSeExprUI/Editable.cpp
M  +3    -3    src/KSeExprUI/Utils.cpp

https://invent.kde.org/graphics/kseexpr/commit/9e803a664ff501d85d4de1fca042028ee5887b0e