Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix label of literal nodes not getting updated on project load #252

Merged
merged 2 commits into from
Dec 21, 2022

Conversation

mnamici
Copy link
Collaborator

@mnamici mnamici commented Dec 21, 2022

Fixes an issue where the label of literal nodes loaded from a graphol project file would get the default 'Empty' text rather than the proper literal value.
This also fixes an issue existing since at least v3.1 where editing and saving the literal value without any change would result in a duplicate label getting generated for the node, and an incompatibility
of the graphol exporter with python 3.10.

Previous to this change the doUpdateNodeLabel used to replace
the label whenever a new literal was set. Change this by
setting the new value to the existing label node object.
Also, correctly set the initial label value when a literal
object is passed to the constructor. This fixes a bug
where the literal nodes loaded from a project file would
have the old default 'Empty' label text, and another bug
where editing the literal value and saving without changing
it would result in a duplicated label getting generated for
the literal node.
…nd dimensions

Starting with python 3.10 implicit integer cast with loss is no longer
permitted. This change affects the way invocations to overloaded Qt
methods are bound in PyQt.
Previous to this change an invocation to the overloaded
QDomElement.setAttribute() method with a numeric type as argument
would always result in the integer version being invoked, even
with a floating-point number as argument. When running under
python 3.10 or later instead, a call to the QDomElement.setAttribute()
with a floating-point number would result in the float version of
the method to be called, resulting in the XML attribute getting serialized
with the floating-point value, which would then fail to be loaded
by the loader since we assume to be always using integer sizes
and coordinates in graphol.
This commit adds an explicit integer cast in the graphol exporter
whenever such situation might occur.
@mnamici mnamici merged commit 4fc7b30 into obdasystems:develop Dec 21, 2022
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