Skip to content

Commit

Permalink
fix(guide,view): Proper access to view allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
franzlst committed Oct 16, 2018
1 parent 7e4c8a2 commit 9eb3ad4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gaphas/guide.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def get_excluded_items(self):

def get_view_dimensions(self):
try:
allocation = self.view.allocation
allocation = self.view.get_allocation()
except AttributeError as e:
return 0, 0
return allocation.width, allocation.height
Expand Down
2 changes: 1 addition & 1 deletion gaphas/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ def queue_draw_area(self, x, y, w, h):
super(GtkView, self).queue_draw_area(int(x), int(y), int(w+1), int(h+1))
except OverflowError:
# Okay, now the zoom factor is very large or something
a = self.allocation
a = self.get_allocation()
super(GtkView, self).queue_draw_area(0, 0, a.width, a.height)


Expand Down

0 comments on commit 9eb3ad4

Please sign in to comment.