Bug 408481 - 'Stroke Selection' creates thick lines when the application language is set to Korean
Summary: 'Stroke Selection' creates thick lines when the application language is set t...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Selection (show other bugs)
Version: 4.2.1
Platform: Microsoft Windows Microsoft Windows
: NOR minor
Target Milestone: ---
Assignee: Halla Rempt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-09 11:52 UTC by acc4commissions
Modified: 2019-06-13 06:33 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
recording of the problem (306.87 KB, video/mp4)
2019-06-09 11:52 UTC, acc4commissions
Details

Note You need to log in before you can comment on or make changes to this bug.
Description acc4commissions 2019-06-09 11:52:21 UTC
Created attachment 120722 [details]
recording of the problem

SUMMARY

Selection > (Right Click) > Transform > Stroke Selection creates thick lines (as if the numbers are multiplied;) when the application language is set to Korean.

It's weird but it doesn't seem to happen with the other language settings.

The Stroke Selection settings that I used in the attached video : 
Type : Line Selection
Line : Foreground color (Black)
Width : 2px
Fill : None


STEPS TO REPRODUCE
1. Make a selection > (Right Click) > Transform > Stroke Selection
2. Set any number in Width (Around 1~5px would be easy to see what happens)
3. Press OK.

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 vanyossi 2019-06-11 04:16:17 UTC
I can confirm this odd bug in macOS
Comment 2 Halla Rempt 2019-06-12 13:30:54 UTC
Could it be that the translation is wrong, and that px and inch are switched in the unit combobox? When I tried to stroke a selection with an 1 inch, I got an assert though:



ASSERT: "pen.color() == Qt::white" in file /home/boud/dev/krita/libs/image/kis_painter.cc, line 1476
[KCrash Handler]
#6  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#7  0x00007f15ec2c5801 in __GI_abort () at abort.c:79
#8  0x00007f15ecc9af2b in QMessageLogger::fatal(char const*, ...) const () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007f15ecc9a721 in qt_assert(char const*, char const*, int) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007f15eed457e3 in KisPainter::drawPainterPath (this=<optimized out>, path=..., pen=..., requestedRect=...) at /home/boud/dev/krita/libs/image/kis_painter.cc:1476
#11 0x00007f15eed45fd8 in KisPainter::drawPainterPath (this=<optimized out>, path=..., pen=...) at /home/boud/dev/krita/libs/image/kis_painter.cc:1469
#12 0x00007f15f0452023 in KisMaskedFreehandStrokePainter::<lambda(KisFreehandStrokeInfo*)>::operator() (data=<optimized out>, __closure=<synthetic pointer>) at /home/boud/dev/krita/libs/ui/tool/strokes/KisMaskedFreehandStrokePainter.cpp:109
#13 KisMaskedFreehandStrokePainter::applyToAllPainters<KisMaskedFreehandStrokePainter::drawPainterPath(const QPainterPath&, const QPen&)::<lambda(KisFreehandStrokeInfo*)> > (func=..., this=this@entry=0x7f1570311ba0) at /home/boud/dev/krita/libs/ui/tool/strokes/KisMaskedFreehandStrokePainter.cpp:43
#14 KisMaskedFreehandStrokePainter::drawPainterPath (this=this@entry=0x7f1570311ba0, path=..., pen=...) at /home/boud/dev/krita/libs/ui/tool/strokes/KisMaskedFreehandStrokePainter.cpp:108
#15 0x00007f15f0442582 in FreehandStrokeStrategy::doStrokeCallback (this=0x55e3a73a80e0, data=<optimized out>) at /home/boud/dev/krita/libs/ui/tool/strokes/freehand_stroke.cpp:209
#16 0x00007f15ef0e3760 in non-virtual thunk to KisUpdateJobItem::run() () from /home/boud/dev/i-krita/lib/x86_64-linux-gnu/libkritaimage.so.19
#17 0x00007f15eccc33e2 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#18 0x00007f15eccbec72 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#19 0x00007f15e5e5a6db in start_thread (arg=0x7f1590b87700) at pthread_create.c:463
#20 0x00007f15ec3a688f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Comment 3 Halla Rempt 2019-06-12 13:43:21 UTC
Hm, checking in the po file, everything looks correct.
Comment 4 Halla Rempt 2019-06-12 13:44:09 UTC
Git commit 3e4f7732edf559a9fb2322950f5c6a387c3cddff by Boudewijn Rempt.
Committed on 12/06/2019 at 13:43.
Pushed by rempt into branch 'master'.

Convert assert to a safe assert

If we know what the value should be, we can use that and not crap
out.

M  +4    -2    libs/image/kis_painter.cc

https://invent.kde.org/kde/krita/commit/3e4f7732edf559a9fb2322950f5c6a387c3cddff
Comment 5 Halla Rempt 2019-06-12 13:48:16 UTC
Git commit 0b9fe0f1f0aa8b2b0a92b8ec1903dc29d96f9519 by Boudewijn Rempt.
Committed on 12/06/2019 at 13:48.
Pushed by rempt into branch 'master'.

Do not compare translated and untranslated strings
BACKPORT:krita/4.2

M  +2    -2    libs/ui/dialogs/kis_dlg_stroke_selection_properties.cpp

https://invent.kde.org/kde/krita/commit/0b9fe0f1f0aa8b2b0a92b8ec1903dc29d96f9519
Comment 6 Halla Rempt 2019-06-13 06:33:14 UTC
Git commit b4eb07b7e4af46a59d41b7c8c409e2ba65bd55d8 by Boudewijn Rempt.
Committed on 13/06/2019 at 05:59.
Pushed by rempt into branch 'krita/4.2'.

Do not compare translated and untranslated strings
BACKPORT:krita/4.2
(cherry picked from commit 0b9fe0f1f0aa8b2b0a92b8ec1903dc29d96f9519)

M  +2    -2    libs/ui/dialogs/kis_dlg_stroke_selection_properties.cpp

https://invent.kde.org/kde/krita/commit/b4eb07b7e4af46a59d41b7c8c409e2ba65bd55d8
Comment 7 Halla Rempt 2019-06-13 06:33:17 UTC
Git commit 871f64c291ec585b4c68463102640e6b45a0856c by Boudewijn Rempt.
Committed on 13/06/2019 at 06:01.
Pushed by rempt into branch 'krita/4.2'.

Convert assert to a safe assert

If we know what the value should be, we can use that and not crap
out.

M  +4    -2    libs/image/kis_painter.cc

https://invent.kde.org/kde/krita/commit/871f64c291ec585b4c68463102640e6b45a0856c