Fix label of literal nodes not getting updated on project load#252
Merged
mnamici merged 2 commits intoobdasystems:developfrom Dec 21, 2022
Merged
Fix label of literal nodes not getting updated on project load#252mnamici merged 2 commits intoobdasystems:developfrom
mnamici merged 2 commits intoobdasystems:developfrom
Conversation
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.
66ffee2 to
4fc7b30
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.