Fixed an error where executing would cause new objects to be created instead of removing the old ones.

This commit is contained in:
Jeremy Mack Wright 2016-10-04 17:14:59 -04:00
parent 2c18886dd5
commit ccf2032b8b

View File

@ -9,7 +9,7 @@ def clearActiveDocument():
# Grab our code editor so we can interact with it
mw = FreeCADGui.getMainWindow()
mdi = mw.findChild(QtGui.QMdiArea)
winName = mdi.currentSubWindow().windowTitle().split('.')[0]
winName = mdi.currentSubWindow().windowTitle().split(" ")[0].split('.')[0]
try:
doc = FreeCAD.getDocument(winName)