Skip to content

BUG : Qt repaint workaround on windows - #2844

Merged
efiring merged 1 commit into
matplotlib:v1.3.xfrom
tacaswell:qt_win_specialcase
Mar 12, 2014
Merged

efiring merged 1 commit into
matplotlib:v1.3.xfrom
tacaswell:qt_win_specialcase

Conversation

@tacaswell

Copy link
Copy Markdown
Member

Added platform specific replacement of update with repaint in
FigureCanvasQtAgg.draw for windows.

Added platform specific replacement of `update` with `repaint` in
`FigureCanvasQtAgg.draw` for windows.
@Tillsten

Copy link
Copy Markdown
Contributor

This works and should be merged. What happens under windows is that the update events are posted, but the painting happens quite unregular, sometimes only every 20th update. Don't know the reason why.

One remark: I think also non-windows should use repaint.
Reason: The draw() method should guarantee an repaint, at the moment
it has the behavior i except from draw_idle().

@Tillsten

Copy link
Copy Markdown
Contributor

This should be merged before the next release.

@tacaswell

Copy link
Copy Markdown
Member Author

@Tillsten That is the plan. It is waiting on some one else but me to push the big green button.

@Tillsten

Copy link
Copy Markdown
Contributor

@tacaswell Any comment to the point i made?

@tacaswell

Copy link
Copy Markdown
Member Author

As discussed in #2559 , I do not want to go against the suggestions of the QT docs with out a very good reason, in this case, the reason is that windows is a broken platform. The change makes no difference on linux (and I suspect mac as no mac-users have complained about this and there are a few devs who I know use both mac and the QT backend) so there is no reason to expose the other systems to the possible consequences of miss-using the gui toolkit. We should in general not be fighting the event-loop.

The behaviour I expect from draw_idle is that the mpl-level draw is only called when the system is idle. In this case, canvas.draw is hit every time draw is called.

efiring added a commit that referenced this pull request Mar 12, 2014
BUG : Qt repaint workaround on windows
@efiring
efiring merged commit 7feeb0e into matplotlib:v1.3.x Mar 12, 2014
@tacaswell
tacaswell deleted the qt_win_specialcase branch March 12, 2014 19:20
@Tillsten

Copy link
Copy Markdown
Contributor

Sorry to bring up this PR again, but i think this should go at least to changes.txt.

@tacaswell

Copy link
Copy Markdown
Member Author

@Tillsten Yeah, you are right.

tacaswell added a commit to tacaswell/matplotlib that referenced this pull request Apr 2, 2014
efiring added a commit that referenced this pull request Apr 4, 2014
DOC : added missing doc changes from #2844
@tacaswell

Copy link
Copy Markdown
Member Author

@Tillsten I have completely come around on the need for this on windows, sorry for the push back.

https://stackoverflow.com/questions/23167424/matplotlib-button-color-updates-only-after-moving-mouse?noredirect=1#comment35491004_23167424

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.

4 participants