Skip to content

Conversation

@dl3sdo
Copy link
Member

@dl3sdo dl3sdo commented Feb 5, 2023

Text object properties like the text itsef, alignment and rotation were previously imported by putting them into a string and transporting the string via the description property of the related text symbol. Besides being an awkward design the approach suffers from multiple deficiencies: the auxiliary string was not removed from the description field, the rotation angle was rounded (e.g., -17.2 became 20) and the way of constructing and parsing the string was unnecessary complex.

This commit uses a static QVariantHash object to transport the object properties. As only a single object is imported at a time it's not required to pass a reference to this QVariantHash object to the functions that return the related symbol and retrieve the object properties.

Text object properties like the text itsef, alignment and rotation were
previously imported by putting them into a string and transporting the
string via the description property of the related text symbol.
Besides being an awkward design the approach suffers from multiple
deficiencies: the auxiliary string was not removed from the description
field, the rotation angle was rounded (e.g., -17.2 became 20) and the
way of constructing and parsing the string was unnecessary complex.

This commit uses a static QVariantHash object to transport the object
properties. As only a single object is imported at a time it's not
required to pass a reference to this QVariantHash object to the
functions that return the related symbol and retrieve the object
properties.
@dl3sdo dl3sdo marked this pull request as draft March 18, 2023 21:50
@dl3sdo
Copy link
Member Author

dl3sdo commented Apr 6, 2025

Superseeded by #2136

@dl3sdo dl3sdo closed this Apr 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant