Bug 367547 - [layer-color-label] Newer Krita can't read a color label set by Krita 3.0
Summary: [layer-color-label] Newer Krita can't read a color label set by Krita 3.0
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Layer Stack (other bugs)
Version First Reported In: 3.0.1 Alpha
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-19 07:42 UTC by David REVOY
Modified: 2019-08-16 07:09 UTC (History)
1 user (show)

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


Attachments
[screenshot of the bug, annoted] (411.95 KB, image/jpeg)
2016-08-19 07:42 UTC, David REVOY
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David REVOY 2016-08-19 07:42:29 UTC
Created attachment 100679 [details]
[screenshot of the bug, annoted]

Hi,
It's a little bug I catch today: newer version of Krita were not restoring a specific "color-label" of layer set in Krita 3.0 ( the dark grey color, if I unzip the *.kra ; maindox.xml keep the layer color with this : colorlabel="9" ). A picture in attachment show the problem.

How to reproduce:
===============
- Open a document with layers in Krita 3.0
- Right click on a layer node in the stack, and in the contextual menu select the last color proposed (dark grey)
- Save document.
- Reopen the document in 3.0.1alpha1 or 3.0.1alpha2 appimage.

Result:
======
The color label isn't restored. ( WIP *.kra comic page demo file: https://share.kde.org/index.php/s/Gz5uEjGEmHf46Vw ). After investigation with DmitryK on IRC ; he told me a color label was removed after a suggestion of Gdquest. 

Expected:
========
I understand newer version of Krita can't read colorlabel="9" :  the color slot "9" is not existing anymore in newer version.  The ex-light grey color ( color 8 ) got removed and ex-dark grey color ( color 9 ) now take the slot color 8. 
* proposal :
Maybe Krita can workaround this with a type of pseudo code :
``` if colorlabel=9 then colorlabel=8" ``` ### Probably a bit dirty :/  
or 
``` if colorlabel>8 then colorlabel=8``` ### maybe wiser to always fallback on 8 for any superior value...
Comment 1 Dmitry Kazakov 2016-08-19 08:10:34 UTC
Git commit fb90378afe58fb5b02099fb149b33cc768a773e9 by Dmitry Kazakov.
Committed on 19/08/2016 at 08:10.
Pushed by dkazakov into branch 'master'.

Fix overflowing color labels

They should always have some color and not become transparent again.

M  +11   -1    libs/ui/kis_node_view_color_scheme.cpp

http://commits.kde.org/krita/fb90378afe58fb5b02099fb149b33cc768a773e9
Comment 2 Halla Rempt 2016-08-20 09:17:24 UTC
Git commit e30da24d2fad3a930a800a65875b263db85a9456 by Boudewijn Rempt.
Committed on 20/08/2016 at 09:16.
Pushed by rempt into branch 'master'.

If the label is beyond the currently allowed range of labels, set
it to the last available label.

M  +6    -1    libs/ui/kra/kis_kra_loader.cpp

http://commits.kde.org/krita/e30da24d2fad3a930a800a65875b263db85a9456