소스 검색

Fix to map info text rectangle

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@48197 15284696-431f-4ddb-bdfa-cd5b030d7da7
Michael Barton 13 년 전
부모
커밋
a4c84be7e1
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      gui/wxpython/gui_modules/psmap.py

+ 2 - 1
gui/wxpython/gui_modules/psmap.py

@@ -1512,7 +1512,8 @@ class PsMapBufferedWindow(wx.Window):
             dc.SetFont(font)
             pdc.SetFont(font)
             text = '\n'.join(self.itemLabels[self.instruction[drawid].type])
-            textExtent = dc.GetMultiLineTextExtent(text)
+            w,h,lh = dc.GetMultiLineTextExtent(text)
+            textExtent = (w,h)
             textRect = wx.Rect(0, 0, *textExtent).CenterIn(bb)
             r = map(int, bb)
             while not wx.Rect(*r).ContainsRect(textRect) and size >= 8: