Material: Editor and import, delete trailing white spaces

This commit is contained in:
Bernd Hahnebach
2018-06-01 08:21:26 +02:00
parent 7031055d86
commit 5f3fdc9b42
2 changed files with 5 additions and 5 deletions

View File

@@ -210,8 +210,8 @@ class MaterialEditor:
"Edits an item if it is not in the first column"
if column > 0:
self.widget.Editor.editItem(item, column)
def itemChanged(self, item, column):
"Handles text changes"
if item.text(0) == "Section Fill Pattern":

View File

@@ -61,7 +61,7 @@ def insert(filename,docname):
FreeCAD.ActiveDocument = doc
read(filename)
return doc
def export(exportList,filename):
"called when freecad exports a file"
return
@@ -98,7 +98,7 @@ def read(filename):
d[k[0].strip()] = k[1].strip().decode('utf-8')
l += 1
return d
def write(filename,dictionary):
"writes the given dictionary to the given file"
# sort the data into sections
@@ -123,7 +123,7 @@ def write(filename,dictionary):
# write header
rev = FreeCAD.ConfigGet("BuildVersionMajor")+"."+FreeCAD.ConfigGet("BuildVersionMinor")+" "+FreeCAD.ConfigGet("BuildRevision")
filename = filename[0]
if isinstance(filename,unicode):
if isinstance(filename,unicode):
import sys
filename = filename.encode(sys.getfilesystemencoding())
print(filename)