Bug 425830 - Colorize Masks always set to visible when opening a file
Summary: Colorize Masks always set to visible when opening a file
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: File formats (show other bugs)
Version: 4.3.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-26 12:19 UTC by Tiar
Modified: 2020-08-27 21:17 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
File with invisible Colorize Mask (265.60 KB, application/zip)
2020-08-26 12:19 UTC, Tiar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tiar 2020-08-26 12:19:20 UTC
Created attachment 131197 [details]
File with invisible Colorize Mask

SUMMARY
After saving and reopening a file with Colorize Mask, it will be always set to visible even if it was saved invisible.


STEPS TO REPRODUCE
1. Create or open a file with Colorize Mask.
2. Set the mask invisible.
3. Save. (remember to Save As or make sure the file is modified so the changes are actually saved).
4. Open the file in Krita.

OBSERVED RESULT
Colorize Mask is visible now.

EXPECTED RESULT
Colorize Mask should be set to the state that was saved in the file.

ADDITIONAL INFORMATION
This is a regression that happened between 4.1.7 and 4.2.0. (4.2.0 already has this issue).
The file is saved correctly, maindoc.xml says 'visible="0"', files created in 4.2.0 and later can be opened fine in 4.1.7 with the mask invisible as it should be.

SOFTWARE/OS VERSIONS
Krita

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

Qt

  Version (compiled): 5.12.8
  Version (loaded): 5.12.8
Comment 1 Dmitry Kazakov 2020-08-27 21:17:47 UTC
Git commit e19f0b97c05a264b72f018ed527cd7999757568e by Dmitry Kazakov.
Committed on 27/08/2020 at 21:17.
Pushed by dkazakov into branch 'krita/4.3'.

Fix loading visibility of colorize masks

We shouldn't use KisLayerPropertiesIcons::setNodePropertyAutoUndo()
unless we are ready the action to happen asynchronously in a stroke.

In the loading code we should just assign the properties directly,
without doing any updates or undo actions.

M  +1    -1    libs/image/commands/kis_node_property_list_command.cpp
M  +1    -1    libs/image/commands/kis_node_property_list_command.h
M  +2    -2    libs/image/kis_layer_properties_icons.cpp
M  +1    -2    libs/image/kis_layer_properties_icons.h
M  +1    -1    libs/ui/kis_node_manager.cpp
M  +4    -2    plugins/impex/libkra/kis_kra_loader.cpp
M  +3    -2    plugins/impex/libkra/tests/kis_kra_saver_test.cpp
M  +17   -17   plugins/tools/tool_lazybrush/kis_tool_lazy_brush.cpp
M  +3    -3    plugins/tools/tool_lazybrush/kis_tool_lazy_brush_options_widget.cpp

https://invent.kde.org/graphics/krita/commit/e19f0b97c05a264b72f018ed527cd7999757568e
Comment 2 Dmitry Kazakov 2020-08-27 21:17:59 UTC
Git commit b1ff4c756694add2aa4bf3815ac82621973bb105 by Dmitry Kazakov.
Committed on 27/08/2020 at 21:17.
Pushed by dkazakov into branch 'master'.

Fix loading visibility of colorize masks

We shouldn't use KisLayerPropertiesIcons::setNodePropertyAutoUndo()
unless we are ready the action to happen asynchronously in a stroke.

In the loading code we should just assign the properties directly,
without doing any updates or undo actions.

M  +1    -1    libs/image/commands/kis_node_property_list_command.cpp
M  +1    -1    libs/image/commands/kis_node_property_list_command.h
M  +2    -2    libs/image/kis_layer_properties_icons.cpp
M  +1    -2    libs/image/kis_layer_properties_icons.h
M  +1    -1    libs/ui/kis_node_manager.cpp
M  +4    -2    plugins/impex/libkra/kis_kra_loader.cpp
M  +3    -2    plugins/impex/libkra/tests/kis_kra_saver_test.cpp
M  +17   -17   plugins/tools/tool_lazybrush/kis_tool_lazy_brush.cpp
M  +3    -3    plugins/tools/tool_lazybrush/kis_tool_lazy_brush_options_widget.cpp

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