Qt5: Add flag that informs paintEvent if the agg buffer needs to updated, fix rubberband#4962
Qt5: Add flag that informs paintEvent if the agg buffer needs to updated, fix rubberband#4962pwuertz wants to merge 3 commits intomatplotlib:masterfrom pwuertz:qt5_agg_redraw_flag
Conversation
There was a problem hiding this comment.
This should go in the init so it is always defined.
There was a problem hiding this comment.
It should, but this is seems to be a Mixin for which the init method is not called at all.
There was a problem hiding this comment.
Then we should fix that problem as well.
|
Added two new commits for fixing the rubberband in qt. The first adds a The other commit changes the rubberband handling in the qt backend to utilize the rubberband removal handler. The previous solution was to simply remove the rectangle after each draw. This method fails when there is an additional paintEvent between two Also, changing the state of the rubberband doesn't trigger an agg buffer redraw anymore, freeing some CPU cycles while dragging. |
|
Moving on to #4972 |
Added a flag for determining if paintEvent needs to update the agg buffer or not. The buffer is updated when draw_idle triggers the paintEvent and the buffer is considered valid after using draw and when using blit.
Discussion in #4943, Speed up Example in #4947