瀏覽代碼

Once more fixing text extent

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@48198 15284696-431f-4ddb-bdfa-cd5b030d7da7
Michael Barton 13 年之前
父節點
當前提交
327bb3d595
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      gui/wxpython/gui_modules/psmap.py

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

@@ -1521,8 +1521,7 @@ class PsMapBufferedWindow(wx.Window):
                 font.SetPointSize(size)
                 font.SetPointSize(size)
                 dc.SetFont(font)
                 dc.SetFont(font)
                 pdc.SetFont(font)
                 pdc.SetFont(font)
-                w,h,lh = dc.GetMutiLineTextExtent(text)
-                textExtent = (w,h)
+                textExtent = dc.GetTextExtent(text)
                 textRect = wx.Rect(0, 0, *textExtent).CenterIn(bb)
                 textRect = wx.Rect(0, 0, *textExtent).CenterIn(bb)
             pdc.SetTextForeground(wx.Color(100,100,100,200)) 
             pdc.SetTextForeground(wx.Color(100,100,100,200)) 
             pdc.SetBackgroundMode(wx.TRANSPARENT)
             pdc.SetBackgroundMode(wx.TRANSPARENT)