Strange Behaviour after importing SVG
Bug #1236074 reported by
Laura Dietz
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
New
|
Undecided
|
Unassigned |
Bug Description
Inkscape version: 0.48.4
Steps to reproduce:
1. create a new Inkscape file
2. add a rectangle, set stroke and width
3. File -> Import, select attached svg
4. resize rectangle
Expected behavior:
- rectangle is resized without further changes to style
Observed behavior:
- rectangle disappears, because opacity is set to 0.
Even after deleting the imported SVG, the rectangle is still invisible. It seems that saving and reloading (with File -> Revert) the svg will make the rectangle visible again and resizing works fine.
To post a comment you must log in.
The SVG file you are importing contains a stylesheet which defines the opacity for all rects as '0'. When you scale the rectangle with the select tool, it is updated (position, dimension, stroke width), and just imported new global style directive is taken into account (the opacity value of the rect's 'style' attribute stores that value persistently - copied from the stylesheet):
<…> "text/css" "style4" >svg { background-color: #881C1C; } rect { opacity: 0; }</style>
<style
type=
id=
<…>
Just curious: what is the origin of that SVG file? Inkscape does not write such internal stylesheets itself, but does apply them when encountered in SVG files (limited CSS support).
Possible bugs encountered with importing such a file might be
1) a perceived inconsistency that only the 'scaling' the selection with the select tool triggers a recalculation of the style information (AFAIU because scaling may require a recalculation of the stroke width) - moving or rotating the existing rectangle does not have the same effect, nor does editing the geometry of the rectangle with the rect tool.
2) the style change based on the imported stylesheet is not recorded in the undo history (undoing the scaling does not revert the style change)
3) no visible information / message for the user which (optionally) warns about possibly unintended style changes based on the stylesheet of the imported file