<switch> node does not update when deleting a child (rev >= 12532)

Bug #1254373 reported by Patrick Storz on 2013-11-24
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Medium
Markus Engel

Bug Description

When deleting a child from a <switch> node, Inkscape does not update the rendered image to reflect this change. The child is deleted but it stays on the screen.

Additionally it is still possible to select the (now non-existent element) and apply changes to it. They are all lost when saving the document, though.

For an example see the attached testcase:
- The testcase should show "English" (if your system language is set to English) or "other" otherwise.
- Select the text node in Inkscape and delete it.
- The node is deleted (as visible in XML editor or after saving) but the text is still shown and you can even edit it

Patrick Storz (ede123) wrote :
su_v (suv-lp) wrote :

On OS X 10.7.5:
- not reproduced with Inkscape 0.48.4
- reproduced with current trunk r12833

Based on tests with archived builds (works with r12531, fails with rev >= 12532), this regression seems to have first appeared with with the merge of the C++ification branch in r12532, and was not automagically fixed with r12794 for bug #1249862.

tags: added: svg
tags: added: regression
Changed in inkscape:
importance: Undecided → Medium
milestone: none → 0.49
status: New → Triaged
summary: - <switch> node does not update when deleting a child
+ <switch> node does not update when deleting a child (rev >= 12532)
Markus Engel (engelmarkus) wrote :

Try the attached patch. This should make the switch react to changes in the xml editor.

Changed in inkscape:
assignee: nobody → Markus Engel (engelmarkus)
status: Triaged → In Progress
su_v (suv-lp) wrote :

Patch tested with r12840 on OS X 10.7.5:

Only a partial fix AFAIU: r12531 immediately displays the remaining switch (content 'other') after deleting the text object with content 'English', the patched build OTOH just renders an empty canvas.

(BTW - I don't delete the element via XML Editor: I enter the nested groups, select the text object and hit <Backspace>)

Markus Engel (engelmarkus) wrote :

This just seems to be a problem of the order of the function calls. Does this patch fix the problems?

jazzynico (jazzynico) wrote :

Patch from comment #5 tested successfully on Crunchbang Waldorf, Inkscape trunk revision 13033. The "Other" text element is correctly shown when deleting the "English" text element.

Markus Engel (engelmarkus) wrote :

Fixed in r13044.

Changed in inkscape:
status: In Progress → Fix Released
su_v (suv-lp) on 2014-02-19
Changed in inkscape:
milestone: 0.91 → none
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments