After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 607564 - custom shape svg:text elements positioned wrong when opening a saved .dia file
custom shape svg:text elements positioned wrong when opening a saved .dia file
Status: RESOLVED FIXED
Product: dia
Classification: Other
Component: shapes
0.97
Other Linux
: Normal normal
: 0.97.2
Assigned To: Dia maintainers
Dia maintainers
Depends on:
Blocks:
 
 
Reported: 2010-01-20 16:17 UTC by sumanb
Modified: 2011-12-06 09:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshots showing positioning of svg:text elements before and after (85.52 KB, image/jpeg)
2010-01-20 16:17 UTC, sumanb
Details
test shape (3.17 KB, text/plain)
2011-12-05 11:15 UTC, SCD
Details

Description sumanb 2010-01-20 16:17:38 UTC
Created attachment 151847 [details]
Screenshots showing positioning of svg:text elements before and after

When opening a saved .dia file, custom shapes with <svg:text> elements appear with the text positioned incorrectly.  This positioning issue extends to printing and exporting the file.  Adding a new instance of the custom shape to the diagram causes all existing instances of the custom shape to reposition the text correctly.  The text is only positioned incorrectly if there are multiple instances of the shape.

Steps to reproduce:
  1) create a new diagram and add several instances of a custom shape containing a svg:text element.  The results are more pronounced if the shapes are scattered randomly across the diagram.

  2) save the diagram in the native .dia file format and close Dia

  3) reopen Dia and reopen your savied diagram.  The svg:text elements should now appear positioned incorrectly.

  4) add a new instance of the custom shape and refresh the diagram, all of the old instances should refresh with their text positioned correctly.  Refreshing before adding the new instance of the custom shape will have no effect.
Comment 1 Hans Breuer 2010-01-24 17:18:50 UTC
Attaching the shape and the diagram would probably make look into this in more detail.
Comment 2 zindelspitz 2010-05-05 21:33:20 UTC
The first custom shape with text, you put on diagram, has the text on the wrong position. If you put a second instance, the text is on the right position. If you refersh then the diagram, also the first instance has then the text at the right position.
Comment 3 Hans Breuer 2010-10-20 19:40:25 UTC
custom_distance_from(), custom_draw() and custom_update_data() are modifying the conceptionally const display_list, i.e. the Text object contained (shared between all object instances), but update_data was not restoring the previous state.

http://git.gnome.org/browse/dia/commit/?id=fb449723e36a92a43fc3a15e565a6ff4556d4ee9
Comment 4 Hans Breuer 2011-01-07 11:45:05 UTC
Cherry-picked to dia-0-97 branch
Comment 5 SCD 2011-12-05 11:15:34 UTC
Created attachment 202823 [details]
test shape

This shape can be used to reproduce the issue but the issue is not limited to just this shape.
Comment 6 SCD 2011-12-05 11:16:24 UTC
I'm still seeing this issue in ver 0.97.1 on Mac OSX 10.6.8.
Comment 7 SCD 2011-12-05 13:36:52 UTC
I'm still seeing this issue in ver 0.97.1 on Mac OSX 10.6.8.
Comment 8 Hans Breuer 2011-12-05 19:00:03 UTC
(In reply to comment #6)
> I'm still seeing this issue in ver 0.97.1 on Mac OSX 10.6.8.
to be expected, target milestone is 0.97.2 - not yet released
Comment 9 SCD 2011-12-06 09:34:39 UTC
My apologies, I misunderstood. Thanks.