diff --git a/wxPython/wx/lib/ogl/_basic.py b/wxPython/wx/lib/ogl/_basic.py index de7b94a2b0..a8abcd5f54 100644 --- a/wxPython/wx/lib/ogl/_basic.py +++ b/wxPython/wx/lib/ogl/_basic.py @@ -521,7 +521,7 @@ class Shape(ShapeEvtHandler): # Don't try to resize an object with more than one image (this # case should be dealt with by overriden handlers) if (region.GetFormatMode() & FORMAT_SIZE_TO_CONTENTS) and \ - region.GetFormattedText().GetCount() and \ + len(region.GetFormattedText()) and \ len(self._regions) == 1 and \ not Shape.GraphicsInSizeToContents: diff --git a/wxPython/wx/lib/ogl/_oglmisc.py b/wxPython/wx/lib/ogl/_oglmisc.py index cca574608d..ad2640bc18 100644 --- a/wxPython/wx/lib/ogl/_oglmisc.py +++ b/wxPython/wx/lib/ogl/_oglmisc.py @@ -153,7 +153,7 @@ def GetCentredTextExtent(dc, text_list, xpos = 0, ypos = 0, width = 0, height = max_width = 0 for line in text_list: - current_width, char_height = dc.GetTextExtent(line) + current_width, char_height = dc.GetTextExtent(line.GetText()) if current_width > max_width: max_width = current_width