Unicode fixes for Python3
This commit is contained in:
@@ -21,6 +21,8 @@
|
||||
#* *
|
||||
#***************************************************************************
|
||||
|
||||
import six
|
||||
|
||||
import FreeCAD as App
|
||||
import FreeCADGui as Gui
|
||||
|
||||
@@ -454,8 +456,8 @@ class TaskPanel:
|
||||
if loc in ['left', 'right']:
|
||||
spine.set_position(('outward', form.yOffset.value()))
|
||||
# Now we can restore axes labels
|
||||
Plot.xlabel(unicode(x))
|
||||
Plot.ylabel(unicode(y))
|
||||
Plot.xlabel(six.text_type(x))
|
||||
Plot.ylabel(six.text_type(y))
|
||||
plt.update()
|
||||
|
||||
def onScales(self):
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#* *
|
||||
#***************************************************************************
|
||||
|
||||
import six
|
||||
|
||||
import FreeCAD as App
|
||||
import FreeCADGui as Gui
|
||||
|
||||
@@ -221,9 +223,9 @@ class TaskPanel:
|
||||
form.xLabel = self.widget(QtGui.QLineEdit, "titleX")
|
||||
form.yLabel = self.widget(QtGui.QLineEdit, "titleY")
|
||||
|
||||
Plot.title(unicode(form.title.text()))
|
||||
Plot.xlabel(unicode(form.xLabel.text()))
|
||||
Plot.ylabel(unicode(form.yLabel.text()))
|
||||
Plot.title(six.text_type(form.title.text()))
|
||||
Plot.xlabel(six.text_type(form.xLabel.text()))
|
||||
Plot.ylabel(six.text_type(form.yLabel.text()))
|
||||
plt.update()
|
||||
|
||||
def onFontSizes(self, value):
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
import os
|
||||
|
||||
import six
|
||||
|
||||
import FreeCAD as App
|
||||
import FreeCADGui as Gui
|
||||
|
||||
@@ -51,7 +53,7 @@ class TaskPanel:
|
||||
form.sizeX = self.widget(QtGui.QDoubleSpinBox, "sizeX")
|
||||
form.sizeY = self.widget(QtGui.QDoubleSpinBox, "sizeY")
|
||||
form.dpi = self.widget(QtGui.QSpinBox, "dpi")
|
||||
path = unicode(form.path.text())
|
||||
path = six.text_type(form.path.text())
|
||||
size = (form.sizeX.value(), form.sizeY.value())
|
||||
dpi = form.dpi.value()
|
||||
Plot.save(path, size, dpi)
|
||||
|
||||
Reference in New Issue
Block a user