trunk: hiding a layer or object fails unless element already has 'display' style property

Bug #1662285 reported by su_v on 2017-02-06
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
High
Tavmjong Bah

Bug Description

In recent trunk, hiding a layer (via Layers dialog or the layer controls in the status bar), or hiding an object via Object Properties dialog, fails unless the element already has a 'display' property defined in the 'style' attribute.

Steps to reproduce:
1) launch trunk (default prefs, default new doc)
2) draw a rect
3) hide current layer

Expected result:
The just drawn rect disappears from canvas because the layer visibility has been turned off.

Actual result:
The layer toggle for visibility has no effect.

Notes:
* Custom templates with layers might not expose the reported regression if the visibility mode of existing layers had been modified before the SVG file was saved as template.
* Layers in existing documents which have had the visibility changed in past sessions with older trunk builds (or stable versions) are not affected.
* Not reproduced with lp:inkscape r15470 - possibly, this regression is related to the merge of the style dialog in r15471.
* Other layer (or object) properties (lock, layer blend modes) seem not affected.

Known workaround:
Add 'display:inline' to the element's 'style' attribute in the XML Editor.

Reproduced with lp:inkscape r15485 on Ubuntu 14.04.5 LTS.

jazzynico (jazzynico) wrote :

Confirmed on Xubuntu 16.04, lp:inkscape rev. 15484.

Changed in inkscape:
importance: Undecided → High
milestone: none → 0.93
status: New → Triaged
Tavmjong Bah (tavmjong-free) wrote :

The Layer dialog calls SPItem::setHidden() which sets the 'display' property directly without setting the style_src variable which is initialized to SP_STYLE_SRC_UNSET. As writing properties directly is likely to exist throughout Inkscape's code base, it is probably safer to initialize style_src to SP_STYLE_SRC_PROP.

su_v (suv-lp) wrote :

Fix committed by Tavmjong Bah in rev 15490:
https://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/15490
confirmed with lp:inkscape r15492 on Ubuntu 14.04.5 LTS.

Changed in inkscape:
status: Triaged → Fix Released
Mc (mc...) on 2017-02-07
Changed in inkscape:
assignee: nobody → Tavmjong Bah (tavmjong-free)
milestone: 0.93 → none
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers