Skip to content

Commit

Permalink
Startup screen: Move warning messages to automatically wrapped text w…
Browse files Browse the repository at this point in the history
…idget. (#490)

Fixes rare wrapping issues for some users.
  • Loading branch information
marisn committed Apr 8, 2020
1 parent d48aa48 commit 7ddde01
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions gui/wxpython/gis_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def __init__(self, parent=None, id=wx.ID_ANY,
parent=self.panel, id=wx.ID_ANY, label=" %s " %
_("3. Select GRASS Mapset"))

self.lmessage = StaticText(parent=self.panel)
self.lmessage = StaticWrapText(parent=self.panel)
# It is not clear if all wx versions supports color, so try-except.
# The color itself may not be correct for all platforms/system settings
# but in http://xoomer.virgilio.it/infinity77/wxPython/Widgets/wx.SystemSettings.html
Expand Down Expand Up @@ -473,7 +473,6 @@ def _showWarning(self, text):
you know that there is everything correct now.
"""
self.lmessage.SetLabel(text)
self.lmessage.Wrap(self.GetClientSize()[0])
self.sizer.Layout()

def _showError(self, text):
Expand All @@ -487,7 +486,6 @@ def _showError(self, text):
you know that there is everything correct now.
"""
self.lmessage.SetLabel(_("Error: {text}").format(text=text))
self.lmessage.Wrap(self.GetClientSize()[0])
self.sizer.Layout()

def _hideMessage(self):
Expand Down

0 comments on commit 7ddde01

Please sign in to comment.