Fix bounds for empty text nodes#1062
Merged
robertosfield merged 1 commit intoopenscenegraph:masterfrom Apr 14, 2021
Merged
Conversation
Collaborator
|
Could provide details of how to reproduce the problem? I think it would be better to have a dedicated code at the start of the method, along the lines of: |
Contributor
Author
Run that on the attached .dxf, it should print "too big: 7.50612e+09". |
994be8f to
bc0d36a
Compare
Contributor
Author
|
I've updated the change to check |
Owner
|
Hi Calum,
Thanks for the model. I can't look at it right away, but once I've
finished my current task I'll have a look.
W.r.t to the changed commit. I don't know whether the Vec3{} usage will
work with older compilers, () would be safer. Also using an if () else ()
block results in less readable code, for this type of usage I typically
doing a return in the if (null_condition) { hande_nul_condition; return; }
as it minimizes the changes required to unrelated code.
Robert.
…On Tue, 13 Apr 2021 at 14:20, Calum Robinson ***@***.***> wrote:
I've updated the change to check if (_text.empty()) as you suggested.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1062 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABUA25TPPE4UO24MTSCN2LTIRAIRANCNFSM423H3SYA>
.
|
_lineCount can be 0, so we get underflow if the alignment is one of the *_BOTTOM_BASE_LINE.
bc0d36a to
f84072c
Compare
Contributor
Author
|
All done. I had to move the |
Collaborator
|
Looks good! |
Collaborator
|
Also merged with 3.6 and MeshShaders branches. |
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.
_lineCount can be 0 if the TextBase has no text, so we get underflow if the alignment is one of the *_BOTTOM_BASE_LINE. Empty text nodes seem to come up in some of the .dxf files our users are importing.
I've worked around the bug in our code for now by deleting the empty text nodes on load.