Przeglądaj źródła

wxGUI: fix https://trac.osgeo.org/grass/ticket/2026 on Windows

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@60689 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 11 lat temu
rodzic
commit
0d5f3cdcbb
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      gui/wxpython/gui_core/widgets.py

+ 2 - 2
gui/wxpython/gui_core/widgets.py

@@ -463,11 +463,11 @@ class StaticWrapText(GenStaticText):
             self._updateLabel()
             self.init = True
         parent = self.GetParent()
-        newExtent = wx.ClientDC(parent).GetTextExtent(self.GetLabel())
+        newExtent = wx.ClientDC(parent).GetMultiLineTextExtent(self.GetLabel())
         # when starting, width is very small and height is big which creates very high windows
         if newExtent[0] < newExtent[1]:
             return (0, 0)
-        return newExtent
+        return newExtent[:2]
 
     def OnSize(self, event):
         self._updateLabel()