Skip to content

Conversation

@bubblobill
Copy link
Collaborator

@bubblobill bubblobill commented Jan 19, 2026

Identify the Bug or Feature request

fixes #5920
closes #5920

Description of the Change

Changed AbstractDrawing(AbstractDrawing other) to generate a new ID.
Changed shape.draw() to use ... drawnElement = new DrawnElement(shapeDrawable.copy()... to enforce a unique ID.

Test results for the same shape drawn ten times;
lib:shapeTest:

  1. Drawing Id: 3D6EF77ED31245029CD3D14B07879DC7
  2. Drawing Id: 075888047DB34FF09810E495E09B8C3A
  3. Drawing Id: 34476124167A40E7BEAE19BF117BB958
  4. Drawing Id: BCC4D776184B4FA7A490DF8EBF16D372
  5. Drawing Id: F3ABCFCD9AA74D9CA381A01373DCDAAE
  6. Drawing Id: 45BD6B9CC88A45B6B0189C8D55CF827C
  7. Drawing Id: C1F9FFB596224C1D9ED3E80D3FC37981
  8. Drawing Id: 5FAECE5E51AC4F75AD3A86481165D9A4
  9. Drawing Id: 8876E0B3BE2D474B99C9311CB56A0E31
  10. Drawing Id: D53D4819EFEA4D16AB6A2964C09AB68A

Possible Drawbacks

none

Documentation Notes

BugFix: shape.draw() returning duplicate IDs on multiple calls for the same shape.

Release Notes

BugFix: shape.draw() returning duplicate IDs on multiple calls for the same shape.


This change is Reviewable

"batik-transcoder".
Changed "batik" to a bundle containing all three.
"batik-transcoder" which contain the classes:
batik.ext.awt.geom.ExtendedGeneralPath,
batik.ext.awt.geom.Polygon2D,
batik.parser.AWTPathProducer,
batik.parser.ParseException, and
batik.parser.PathParser.

Changed "batik" to a bundle containing all three.
constructor was copying the id.
Changed to generate a new ID on the copy.
drawnElement to "shapeDrawable.copy()" to enforce a new ID.
@github-actions github-actions bot added the bug label Jan 19, 2026
@bubblobill bubblobill self-assigned this Jan 19, 2026
@cwisniew cwisniew added this pull request to the merge queue Jan 19, 2026
Merged via the queue into RPTools:develop with commit f4b7fef Jan 19, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: shape.draw can produce drawings with the same id

2 participants