Skip to content

Commit

Permalink
wxGUI/rdigit: fix for Python3
Browse files Browse the repository at this point in the history
  • Loading branch information
petrasovaa committed Dec 10, 2019
1 parent dc976cf commit cbca9fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gui/wxpython/rdigit/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ def _rasterize(self, text, bufferDist, mapType, tempRaster):
:return: output raster map name as a result of digitization
"""
output = 'x' + str(uuid.uuid4())[:8]
asciiFile = tempfile.NamedTemporaryFile(delete=False)
asciiFile = tempfile.NamedTemporaryFile(mode='w', delete=False)
asciiFile.write('\n'.join(text))
asciiFile.close()

Expand Down
7 changes: 3 additions & 4 deletions gui/wxpython/rdigit/toolbars.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from icons.icon import MetaIcon
from gui_core.widgets import FloatValidator
import wx.lib.colourselect as csel
from gui_core.wrap import TextCtrl, StaticText
from gui_core.wrap import TextCtrl, StaticText, ColourSelect


rdigitIcons = {'area': MetaIcon(img='polygon-create',
Expand Down Expand Up @@ -56,12 +56,11 @@ def __init__(self, parent, giface, controller, toolSwitcher):
self.InsertControl(0, self._mapSelectionCombo)
self._previousMap = self._mapSelectionCombo.GetValue()

self._color = csel.ColourSelect(parent=self, colour=wx.GREEN,
size=(30, 30))
self._color = ColourSelect(parent=self, colour=wx.GREEN, size=(30, 30))
self._color.Bind(
csel.EVT_COLOURSELECT,
lambda evt: self._changeDrawColor())
self._color.SetToolTipString(
self._color.SetToolTip(
_("Set drawing color (not raster cell color)"))
self.InsertControl(4, self._color)

Expand Down

0 comments on commit cbca9fa

Please sign in to comment.