Bug 435944 - Filter Layer Mask not saving
Summary: Filter Layer Mask not saving
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Filter Layers (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Microsoft Windows Microsoft Windows
: NOR major
Target Milestone: ---
Assignee: Emmet O'Neill
URL:
Keywords: regression, release_blocker, triaged
Depends on:
Blocks:
 
Reported: 2021-04-20 02:14 UTC by Andrei Rudenko
Modified: 2021-04-22 21:27 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Rudenko 2021-04-20 02:14:40 UTC
SUMMARY
Filter layer masking not saving when you draw on it, save and open again.

STEPS TO REPRODUCE
1. Create a new document
2. Fill layer with some color (to see changes from filter layer).
3. Create color adjustment(or any) filter layer ontop of the layers.
4. Draw on a filter layer (using black/white, masking)
5. Save and Close
6. Open

OBSERVED RESULT
Changes not saved, filter layer mask is white

EXPECTED RESULT
Changes must be saved

SOFTWARE/OS VERSIONS
Windows 10
krita-nightly-x64-5.0.0-prealpha-460dac9f47

ADDITIONAL INFORMATION
In Krita 4.4.3 it works
Comment 1 Andrei Rudenko 2021-04-20 02:22:15 UTC
Sorry, i forgot to add this

Step 3. Create color adjustment(or any) filter layer ontop of the layers. An make some changes.
Comment 2 Halla Rempt 2021-04-20 13:55:27 UTC
I see that the mask itself isn't saved (or loaded), but the filter definition is.
Comment 3 Eoin O'Neill 2021-04-21 03:41:43 UTC
Git commit 872dd6b01eedc2bb587f4fdef502aa0ad96ec3d4 by Eoin O'Neill.
Committed on 21/04/2021 at 03:41.
Pushed by eoinoneill into branch 'master'.

CURRENT_DTD_VERSION constant addition changed harcoded values from "2" to "2.0" which
lead to issues on KRA load since QString's `toInt()` doesn't seem to like floating point
representation. The result of this was Krita not properly recognizing the syntax
version of a file on load, leading to some loading problems.

M  +3    -2    plugins/impex/libkra/kra_converter.cpp

https://invent.kde.org/graphics/krita/commit/872dd6b01eedc2bb587f4fdef502aa0ad96ec3d4
Comment 4 Eoin O'Neill 2021-04-22 21:27:41 UTC
Git commit 2ca14a1f733ba33bee14371ba351aa6f1b220fd6 by Eoin O'Neill.
Committed on 22/04/2021 at 21:26.
Pushed by eoinoneill into branch 'master'.

Improved version parsing to support both integer and major/minor version syntax.

Somewhere along the way, QStrings with a decimal point resulted in invalid
version detection which lead to being unable to load kra files accurately. After speaking
to Halla, we've decided to move from QString-to-Integer conversion to
QString-to-QVersionNumber

M  +6    -1    plugins/impex/libkra/kra_converter.cpp

https://invent.kde.org/graphics/krita/commit/2ca14a1f733ba33bee14371ba351aa6f1b220fd6