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

Long lines are overlapping help box when Region Overlap enabled #88

Closed
carter2422 opened this issue Jan 12, 2015 · 16 comments
Closed

Long lines are overlapping help box when Region Overlap enabled #88

carter2422 opened this issue Jan 12, 2015 · 16 comments
Assignees
Milestone

Comments

@carter2422
Copy link
Member

I'm guessing this is due to the spacing changes.

screen shot 2015-01-12 at 3 27 39 pm

@carter2422 carter2422 added the bug label Jan 12, 2015
@carter2422 carter2422 self-assigned this Jan 12, 2015
@carter2422 carter2422 added this to the v1.0.0 milestone Jan 12, 2015
@carter2422
Copy link
Member Author

Actually not, I don't believe it has to do with the spacing. Instead I believe it's because we're not account for individual words when wrapping.

@carter2422 carter2422 assigned patmo141 and unassigned carter2422 Jan 12, 2015
@carter2422 carter2422 modified the milestones: v1.0.0, v1.0.1 Apr 13, 2015
@carter2422 carter2422 modified the milestone: v1.0.1 Jul 10, 2015
patmo141 added a commit that referenced this issue Oct 4, 2015
@patmo141
Copy link
Contributor

patmo141 commented Oct 4, 2015

image

I think we are good here as incrementally increasing word length wraps the entire word when too close to border.

@carter2422
Copy link
Member Author

I still get a lot of overlap: http://cl.ly/dQhf

@carter2422
Copy link
Member Author

Ah! It is only an issue when the N Panel is open.

@patmo141
Copy link
Contributor

patmo141 commented Oct 4, 2015

image

hmm....no problem with N panel for me. This may be a problem where the size calculations are wrong with a paticular font or something

@patmo141
Copy link
Contributor

patmo141 commented Oct 4, 2015

@vxlcoder
Copy link
Contributor

vxlcoder commented Oct 6, 2015

it seems that this bug was a problem with settings. @carter2422, when you figure out which setting caused this, let em know so we can report it to blender devs or fix it in our code. (one option is to ship a ttf along with the tool, so we know exactly what font is getting used)

@carter2422
Copy link
Member Author

I think the settings is Region Overlap. Disabling it just fixed it for me. However, the weird bit is that Region Overlap doesn't always cause it.

@carter2422
Copy link
Member Author

Correction, it doesn't always happen with Region Overlap per session. It's consistent within the session, though.

@carter2422 carter2422 changed the title Long lines are overlapping help box Long lines are overlapping help box when Region Overlap enabled Nov 5, 2015
@vxlcoder
Copy link
Contributor

vxlcoder commented Jan 3, 2017

I cannot reproduce this bug. Can you @carter2422?

@carter2422
Copy link
Member Author

@vxlcoder perhaps it's a Mac thing only? I can still replicate it.

With Region Overlap enabled:
screen shot 2017-01-03 at 1 06 49 pm

Without Region Overlap enabled:
screen shot 2017-01-03 at 1 06 39 pm

@vxlcoder
Copy link
Contributor

vxlcoder commented Jan 4, 2017

hmmm. it seems that i can replicate on linux and osx; haven't tried win. blf.dimensions appears to return different/incorrect values (~10% difference) if n panel is open and region overlap is enabled.

ex: "Contours Help (click to hide help):" is (186.046875, 11.625) if either n panel is closed or region overlap is off, but is (169.703125, 10.640625) when n panel is open and region overlap is on.

the t panel (tool shelf) seems to make no difference.

this appears to be a blender bug.

@vxlcoder
Copy link
Contributor

vxlcoder commented Jan 4, 2017

yes. playing in console, i can replicate this problem on osx and linux. strangely, though, it reports different text sizes but only when t panel is open and n panel is closed. will report to blender devs.

@vxlcoder
Copy link
Contributor

vxlcoder commented Jan 4, 2017

reported: https://developer.blender.org/T50372

will update when we hear back from blender devs.

@carter2422
Copy link
Member Author

Thanks for digging in and reporting the bug @vxlcoder

vxlcoder added a commit that referenced this issue Jan 6, 2017
the font size changed because drawing order changed with region overlap
enabled and different panels being opened.

the fix: call blf.size() before calling blf.dimensions().

note: i placed the size() calls at top of calling function rather than
in the txt_width and txt_height calls so size() is not called multiple
times, only once.
@vxlcoder
Copy link
Contributor

vxlcoder commented Jan 6, 2017

turns out this is not a blender bug. the problem is that the drawing order changes when settings are changed (region overlap, open/close panels, etc.), so something was changing the font size. therefore, explicitly placing a blf.size() call before calling blf.dimensions() solved the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants