浏览代码

wxGUI/composer: fix multiline text on Windows

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@56363 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 12 年之前
父节点
当前提交
f1a802fc3b
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      gui/wxpython/psmap/frame.py

+ 5 - 2
gui/wxpython/psmap/frame.py

@@ -2069,8 +2069,11 @@ class PsMapBufferedWindow(wx.Window):
         fn = self.parent.makePSFont(textDict)
 
         pdc.SetFont(fn)
-        pdc.SetTextForeground(convertRGB(textDict['color']))        
-        pdc.DrawRotatedText(textDict['text'], coords[0], coords[1], rot)
+        pdc.SetTextForeground(convertRGB(textDict['color']))
+        if rot == 0:
+            pdc.DrawLabel(text = textDict['text'], rect = bounds)
+        else:
+            pdc.DrawRotatedText(textDict['text'], coords[0], coords[1], rot)
         
         pdc.SetIdBounds(drawId, wx.Rect(*bounds))
         self.Refresh()