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

Lasso-ing in WxAgg causes flickering of the entire figure #4968

Closed
WeatherGod opened this issue Aug 20, 2015 · 12 comments
Closed

Lasso-ing in WxAgg causes flickering of the entire figure #4968

WeatherGod opened this issue Aug 20, 2015 · 12 comments
Labels
Milestone

Comments

@WeatherGod
Copy link
Member

I am using the older Wx, not the new Wx-Phoenix. I'll see if one of our packaged examples demonstrates this.

@tacaswell
Copy link
Member

This is probably related to the auto-redraw 😞

Are you using it with or with out blitting?

@WeatherGod
Copy link
Member Author

Looks like useblit=True for this one.

@tacaswell
Copy link
Member

That is better that what the qt4 backend is doing for me, no flicker, but also no line!

@WeatherGod
Copy link
Member Author

really? I must have forgotten to try lassoing on that backend. I tested gtkagg and tkagg as well.

@tacaswell
Copy link
Member

Things are way broken on master with the lasso example we ship, draw is getting spammed like mad.

@WeatherGod
Copy link
Member Author

Lasso is just one example. I just noticed that using a timer to "page" through multiple frames of data (not an animation, so no blitting), is also causing flickering, although not nearly to the same amount as the lasso. I think I might have a few draw()'s in the code because draw_idle()'s weren't working. Maybe the Wx rework changed some of the old behaviors?

@WeatherGod
Copy link
Member Author

Removal of a polygon takes a few seconds before it finally disappears.

@tacaswell
Copy link
Member

At least on Qt the issue I am seeing is fixed by the two Qt patches from @jrevans (#4943 & #4944).

attn @pwuertz

@tacaswell
Copy link
Member

as a side note, for testing I just threw a print statement in Axes.draw to see how often it was getting hit.

@pwuertz
Copy link
Contributor

pwuertz commented Aug 20, 2015

I think I just figured out how the rubberband/lasso tool is implemented. It's extremely fragile:

  • It is not drawn in the blit-path in paintEvent at all
  • It is never cleared by event handling, currently it is cleared directly after the first paintEvent

This causes the lasso to disappear if there is any additional paintEvent between paintEvents that originated from lasso mouse move events. Also, the lasso stays on screen if the first paintEvent call from Qt happens after the zoomed draw request when the mouse is released. I'll propose a fix to that in #4962.

@pwuertz
Copy link
Contributor

pwuertz commented Aug 20, 2015

I'm seeing no lasso flicker for the normal qt gui by the way, are you talking about the ion() mode? For this there is a pretty good explanation. Those draw_idle() callbacks we talked about are causing additional paintEvents the current lasso implementation cannot cope with. The PR from @jrevans with the old draw_idle() implementation hides this problem because it discards the callbacks.

@tacaswell tacaswell modified the milestones: proposed next point release, next point release Aug 30, 2015
@tacaswell
Copy link
Member

@WeatherGod Can you still reproduce this? Do we need to call in Robin?

@tacaswell tacaswell modified the milestones: next bug fix release (2.0.1), next point release (1.5.0) Oct 29, 2015
@QuLogic QuLogic modified the milestones: next point release (1.5.0), next bug fix release (2.0.1) Oct 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants