Current layer lost when undoing extension function

Bug #1803769 reported by Désarménien
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Undecided
Unassigned

Bug Description

Inkscape 0.92.3
Tested on :
 OS X 10.11.6 (El Capitan)
 Linux Mint 18.2 Cinnamon Kernel 4.13.0.45

When you undo (Ctrl-Z) a change produced by an effect extension, the inkscape:current-layer
attribute of the <sodipodi-namedview> element is incorrectly set to the id attribute of the root
<svg:svg> element and the current layer is lost.

To reproduce the problem :

- Open a new Inkscape session

- Display the layer window (layers->layers)

- Notice that the current layer is selected

- open extentions->render->triangle (as an example)

- click OK and then Close : a triangle has been drawn and the current layer is still selected

- press <CTRL-Z> to undo : the triangle disappear correctly but no more layer is selected in the layer window

- open again extentions->render->triangle (while no layer is selected), click OK and Close

- a new triangle is drawn but looking in the XML Editor window, the inkscape:current-layer attribute is no set to the id of the root <svg:svg> element and the triangle <svg:path> element is directly under (is a child of) the <svg:svg> element, outside any layer, as will be any new drawn object until a layer is selected again in the layer window.

Investigating (building a simple extension), I noticed that the second time an effect extension is called while no layer is selected, the temporary SVG file passed to the extension has a current-layer attribute set to the <svg:svg> id attribute value.

This sounds like a bug, doesn't it ?

Désarménien (fdesar)
description: updated
Revision history for this message
Alvin Penner (apenner) wrote :

confirmed on Windows 10, Inkscape 0.92.3 (2405546, 2018-03-11)

got the same behavior running the extension Render->Calendar

Changed in inkscape:
status: New → Confirmed
Revision history for this message
TylerDurden (8thrule) wrote :

Not reproduced with Inkscape 0.92.2 (5c3e80d, 2017-08-06), Win 8.1-64

Revision history for this message
Alvin Penner (apenner) wrote :

reproduced on Windows 10, Inkscape 0.91 r13725 (Jan 30 2015)

attached is the result I get in 0.91

Revision history for this message
Alvin Penner (apenner) wrote :

not reproduced on Windows 10, Inkscape 0.92+devel (b9177a8, 2018-09-07)

(which is the last version of Inkscape for which the Python extensions work)

Revision history for this message
Désarménien (fdesar) wrote :

What you mean by "which is the last version ... python extensions work" ?
Extensions can be written with other interpreters than Python...

Revision history for this message
Alvin Penner (apenner) wrote :

there have been some recent changes made in the Python support system, so that currently the Python extensions will typically generate unexpected errors or warnings, see:
https://gitlab.com/inkscape/extensions/issues/11

Revision history for this message
Désarménien (fdesar) wrote :

This seems like some changes have been made in the Python module index.py so it is not really an Inkscape extension issue but only a Python issue...

Revision history for this message
Désarménien (fdesar) wrote :

s/index.py/inkex.py/

tags: added: bug-migration
Revision history for this message
grey tomorrow (gtomorrow) wrote :

Closing because INVALID: Can't replicate.

Tested on
- 1.0beta2 (074b463, 2020-02-02), macOS 10.12.6 (16G2136)
- 0.92.4 (5da689c313, 2019-01-14), MacPorts
- 0.92.4+68~ubuntu18.04.1, Ubuntu 18.04.4 LTS
- 1.1-dev (969dcdb233, 2020-03-27), snap package

If you feel this issue has been injustly closed, please feel free to open a new issue at http://inkscape.org/report . Thank you.

Closed by: https://gitlab.com/greytomorrow

Changed in inkscape:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.