Bug 439725

Summary: Removed border of vector rectangle appears again after Save&Load
Product: [Applications] krita Reporter: Valeriy Fedotov <valeriy.fedotov>
Component: Tools/VectorAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: ahab.greybeard
Priority: NOR Keywords: regression
Version First Reported In: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: File with two vector rectangles

Description Valeriy Fedotov 2021-07-10 15:07:03 UTC
Created attachment 139985 [details]
File with two vector rectangles

SUMMARY

I remove a border of a vector rectangle, it is removed correctly in this session. Then I save the file, close it, load it again. After this actions border appears again in black color.

I attach file with two vector rectangle, one with gradient fill, other one with a pattern. Both can be used for reproducing this bug.

Version: 5.0.0-prealpha (git fb6cd70)
Platform: compiled git source, also appears in recent appimages
OS: Ubuntu 20.04

STEPS TO REPRODUCE
1. Open attached file (Or create yours vector rectangle with non-black border).
2. Select vector rectangle with "select shapes tool".
3. Go to "Tool options", select "Stroke" tab, press "No fill" Button. Border seems to be removed.
4. Save file and close it.
5. Load file.

OBSERVED RESULT

Border is back with the same with of line and black color.

EXPECTED RESULT

Border is missing as before save&load.

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

ADDITIONAL INFORMATION
Comment 1 Ahab Greybeard 2021-07-10 21:13:25 UTC
I can confirm this for the July 09 5.0.0-prealpha (git 13f04ca) appimage on Debian 10.
This does not happen with the 4.4.5 appimage, hence regression.

The stroke is also present in the Layer Exported .svg file.
It's not present in the preview or merged image of the .kra files.
Comment 2 sh_zam 2021-07-13 13:10:51 UTC
Git commit a7c5f4ac6e72990426392fce2088de1025c5d89e by Sharaf Zaman.
Committed on 13/07/2021 at 13:09.
Pushed by szaman into branch 'master'.

Bugfix: Black Stroke when "No Fill" is selected

Reason for regression: it was assumed that the color of a "No Fill"
Stroke is Qt::transparent. But since this assumption no longer holds, we
need to check if the color is valid.

M  +3    -1    libs/flake/svg/SvgStyleWriter.cpp

https://invent.kde.org/graphics/krita/commit/a7c5f4ac6e72990426392fce2088de1025c5d89e