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

Text fixup #1235

Merged
merged 44 commits into from
Apr 28, 2015
Merged

Text fixup #1235

merged 44 commits into from
Apr 28, 2015

Conversation

chaosphere2112
Copy link
Contributor

This pull request fixes a bunch of small interaction issues (enumerated below) with how I was handling text previously– among other things, it fixes #1205. It's dependent on this PR, which invalidates some baselines (ctest results) that I haven't regenerated yet; we can do those as part of merging the VTK PR.

The associated PR for testdata is here the changes in this PR invalidated some button baselines, so I've regenerated those in the PR.

Interaction issues:

  • Deleting all of the text from an actor and deselecting it would trigger errors and not update the text actor
  • Cursor would behave erratically while rotating
  • Cursor placement was really inaccurate
  • Clicking on text was inaccurate
  • Dragging text and deselecting it would make text jump slightly, or quite a lot depending on alignment

Plus some more, I'm sure.

@dlonie If you can double check my text actor handling in text.py and textbox.py, that'd be great.

@aashish24 This is the PR that I mentioned in the meeting, @doutriaux1 and you can both feel free to poke through it.

Sam Fries added 30 commits April 27, 2015 10:53
row_left += w
# Return the very end of the box if we can't figure it out.
return len(rows) - 1, len(rows[len(rows) - 1])
# Start from left
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is probably a little more processor intensive, but it works, and it's silly to repeat a ton of the same code when you don't have to.

@aashish24
Copy link
Contributor

@dlonie care to review this one?

for display in self.displays:
for key in display.backend:
try:
if actor == display.backend[key] or actor in display.backend[key] or [True for group in display.backend[key] if actor in group]:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest manually wrapping lines longer than 80 characters. The author is better at breaking lines into easy-to-parse logical chunks than a text editor -- this make it easier to spot errors in logic, etc and quickly grok the conditional parameters while reading through the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to break this logic up a bit; I spotted what may be a small issue in it, so that will help tidy that up.

@alliepiper
Copy link
Contributor

Looked through the patch, nothing major. One small issue with computing dimensions from vtkTextRenderer::GetBoundingBox that should be fixed, but the rest of the comments are more or less just suggestions.

I haven't pulled/tested yet. Let me know if I should go ahead an create the new baselines from the VTK change if @doutriaux1 or @chaosphere2112 hasn't already put them together.

@chaosphere2112
Copy link
Contributor Author

@dlonie I have commits fixing all of the things you pointed out, just waiting on my ports to open so I can push them. I haven't updated the baselines yet; @doutriaux1 have you?

@chaosphere2112
Copy link
Contributor Author

@dlonie @doutriaux1 @aashish24 Pushed up the fixes.

@doutriaux1
Copy link
Contributor

ok we got a passing build at: https://open.cdash.org/viewTest.php?onlyfailed&buildid=3790700
@dlonie please review, dont forget baseline at: CDAT/uvcdat-testdata#40

@alliepiper
Copy link
Contributor

LGTM, a couple failures in that dashboard, but unrelated to this change.

alliepiper pushed a commit that referenced this pull request Apr 28, 2015
@alliepiper alliepiper merged commit 405ecbb into CDAT:master Apr 28, 2015
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.

Deleting text from text widget isn't reflected when you deselect
4 participants