Skip to content
This repository has been archived by the owner on May 24, 2021. It is now read-only.

Commit

Permalink
Merge pull request #257 from enthought/image-fix
Browse files Browse the repository at this point in the history
Fix the image viewer when painting in a clipped region.
  • Loading branch information
sccolbert committed Feb 10, 2013
2 parents 193ba8c + 492b4fd commit 67133d3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion enaml/qt/qt_image_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ def paintEvent(self, event):
if pm_width == 0 or pm_height == 0:
return

evt_rect = event.rect()
# Use the widget rect instead of the event rect so the image
# paints properly in a scroll area where it may be clipped.
evt_rect = self.rect()
evt_x = evt_rect.x()
evt_y = evt_rect.y()
evt_width = evt_rect.width()
Expand Down

0 comments on commit 67133d3

Please sign in to comment.