From 5f3fdc9b426eb421e377eef673b34b21de9a780b Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Fri, 1 Jun 2018 08:21:26 +0200 Subject: [PATCH] Material: Editor and import, delete trailing white spaces --- src/Mod/Material/MaterialEditor.py | 4 ++-- src/Mod/Material/importFCMat.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Mod/Material/MaterialEditor.py b/src/Mod/Material/MaterialEditor.py index b113c17cbb..abe7a107a8 100644 --- a/src/Mod/Material/MaterialEditor.py +++ b/src/Mod/Material/MaterialEditor.py @@ -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": diff --git a/src/Mod/Material/importFCMat.py b/src/Mod/Material/importFCMat.py index 4d41dac676..da42a6b45a 100644 --- a/src/Mod/Material/importFCMat.py +++ b/src/Mod/Material/importFCMat.py @@ -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)