Material: Editor and import, delete trailing white spaces
This commit is contained in:
@@ -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":
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user