Guide colour not rendered opening saved document

Bug #1374870 reported by Michele Gaio on 2014-09-27
46
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Inkscape
Wishlist
Geoff

Bug Description

This bug can be reproduced as follows:

1. Create a new guide.
2. Double-click the guide to open the guide dialog.
3. Choose a colour from the colour picker

The guide is rendered with the desired colour.

4. Save the file
5. Reopen the file

The guide is rendered with the default colour

Inspecting the svg file shows that the guide colour is actually properly saved into the inkscape:color attribute.

Inkscape development, revno: 13564

See also:
Bug #263069 “colored and labeled guides” (In Progress)

Related branches

Wong Cho Ching (chwong249664) wrote :

Reproducable on r13566, linux.

su_v (suv-lp) wrote :

To be expected (I guess): the implementation of Bug #263069 “colored and labeled guides” was never completed, and the fix for the regression reported in bug #823739 only prevented the corruption of the file, not the loading of the guide color.

tags: added: guides
Changed in inkscape:
importance: Undecided → Wishlist
milestone: none → 0.91
su_v (suv-lp) wrote :

On 2014-09-28 13:00 , ~suv wrote:
> and the fix for the regression reported in bug #823739 only prevented
> the corruption of the file, not the loading of the guide color.

Sorry, I meant to say:

"The fix for the regression reported in bug #823739 only prevented the corruption of the file, but did not address loading guide colors from file."

description: updated
Changed in inkscape:
status: New → Confirmed
su_v (suv-lp) on 2014-11-06
Changed in inkscape:
milestone: 0.91 → 0.92
Geoff (geoff-lankow) wrote :

I'm new here, I know hardly anything about the review and commit process, but my changes fix the bug.

su_v (suv-lp) wrote :

@Geoff - thank you for working on a fix for this issue!

Question: any special reason to remove support for per-document custom default guide color? A quick test with Inkscape 0.91+devel r14237+diff from your branch (r14229) shows that while loading the color defined for an individual guide line works as expected, a custom default guide color defined per document in 'Document Properties > Guides' is now ignored once the document is reloaded (the custom guide highlight color still works though). Additionally - changing the default guide color in document properties temporarily overrides custom colors set per guide (they are restored once the document is reloaded).

Steps to reproduce:
1) launch inkscape
2) in the new document, change guide color in document properties (e.g. to green)
3) create 3 guides
4) change the color of two guides
5) save and reload
--> the guide which does not use a custom color renders blue (ignores green guide color set in document properties)
6) change guide color in document properties to red
--> all guides visible on-canvas are now rendered red (it should only affect 1 guide though)
7) save and reload
--> the guide which does not use a custom color renders again blue (instead of now red), the other guides each use their custom color.

Changed in inkscape:
assignee: nobody → Geoff (geoff-lankow)
status: Confirmed → In Progress
Geoff (geoff-lankow) wrote :

I was doing things in the wrong order and the document default colour was overriding the guide colour. I've changed it to do things in the right order.

su_v (suv-lp) wrote :

@Geoff - thanks for the update. Loading custom default guide color now works as expected.

Remaining issue:
Changing the custom default guide color in Document Properties overrides any custom color defined for individual guides - this is a temporary effect, limited to the current session (saving and reloading the file restores the correct colors per guide (if defined)).

Steps to reproduce:
1) launch inkscape
2) create two guides
3) change the color for one of them
4) save file
5) change the default guide color in document properties
--> both guides change color (but the one changed in step 3 should keep its custom color)
6) save, revert (to reload)
--> all guides render as expected (one with custom default guide color, the other one with per-guide custom color)

Geoff (geoff-lankow) wrote :

I've fixed that now too.

su_v (suv-lp) wrote :

Minor Inconsistencies (default guide color overriding custom guide color(s)) with extensions, and undoing extensions:

Steps to reproduce:
1) launch Inkscape (default prefs, new default document)
2) create two guides, change color of one of them to red
3) apply an extension (e.g. 'Extensions > Render > Gear > Gear...')
--> both guides are rendered in default guide color again (blue)
4) save file, revert (or close and reopen)
--> custom guide color is restored for the one guide changed to red

Steps to reproduce:
1) launch Inkscape (default prefs, new default document)
2) change default guide color in 'Document Properties > Guides' e.g. to green
3) create two guides, change color of one of them to red
4) apply an extension (e.g. 'Extensions > Render > Alphabet Soup'
--> guides are still ok
5) undo the extension (Ctrl+Z)
--> all guides revert to the default guide color as defined in 'Document Properties' (green)
6) save, revert (or close and reopen)
--> guides are again rendered as expected.

Geoff (geoff-lankow) wrote :

Yeesh, are there any more places where a guide is created but without reading the colour, or having it overwritten immediately? :-/

su_v (suv-lp) wrote :

@Geoff - sorry for being late with further feedback. I do have a local trunk build with the latest changes of your branch in, but haven't tested it lately yet (will do so this week).

The next step would be for you to propose your branch for merging (see link on the branch page). I then will try to find another reviewer (for the code) to approve, and if ok will commit the merge to trunk.

su_v (suv-lp) wrote :

Branch merged into trunk in rev 14323.

Thank you very much for your contribution (sorry it took so long to get the proposed fix into trunk)!

Changed in inkscape:
status: In Progress → Fix Committed
su_v (suv-lp) on 2015-10-01
tags: added: backport-proposed
su_v (suv-lp) wrote :

Fix backported to 0.91.x in rev 13835.

Changed in inkscape:
milestone: 0.92 → 0.91.1
tags: removed: backport-proposed
ugajin@zoho.com (ugajin-3) wrote :

I recently posted to the dev and user lists about a couple of issues which may be related to this one.

One problem presents when trying to edit the guide color property using the SVG editor. I can edit the code, but the new colour isn't being rendered in Inkscape.

In addition I experience crashes, when trying to edit the guides label property using the SVG editor.

I am using v0.91 (pre-build) on OSX

One way this behaviour may be reproduced is as follows:

- open Inkscape/document
- add guide
- set empty labels with Guidline dialogue
- save document, and close Inkscape
- reopen inkscape/document
- add label property value using SVG editor
- set: result crash!

Sometimes, it takes two edits to cause a crash. The key to reproducing this, is to save and reopen Inkscape/document.

Also, I have an extension update for guides... that has options for labels. The script can write guide labels OK, but they are not editable in either the Guidline dialogue or the SVG editor. Trying to do so causes Inkscape to crash :(

Thanks.

-u

su_v (suv-lp) wrote :

@ugajin - the issue with guide colors (tracked here - bug #1374870) and the crash with labels (tracked in bug #1469514) are known to affect the current stable release (Inkscape 0.91 r13725) - both will be fixed in the next major release Inkscape 0.92 (including editing the color of a specific guide via XML Editor).

ugajin@zoho.com (ugajin-3) wrote :

Thank you. :)

Pander (pander) wrote :

Will this fix (or Inkscape 0.92) make please it into Ubuntu Yakkety 16.10?

Hachmann (marenhachmann) wrote :

@Pander: If not, there's always the ppa that you can use (after the release):
https://launchpad.net/~inkscape.dev/+archive/ubuntu/stable (and maybe also a package for snappy)

jazzynico (jazzynico) on 2017-01-22
Changed in inkscape:
milestone: 0.91.1 → 0.92
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers