Fixed a bug where Helpers.show could not be called more than once, and one that kept macros from being used instead of script editor tabs.
This commit is contained in:
parent
b72b9f4580
commit
36726d5344
|
@ -119,6 +119,9 @@ class CadQueryExecuteScript:
|
|||
# Grab our code editor so we can interact with it
|
||||
cqCodePane = Shared.getActiveCodePane()
|
||||
|
||||
# Clear the old render before re-rendering
|
||||
Shared.clearActiveDocument()
|
||||
|
||||
# Save our code to a tempfile and render it
|
||||
tempFile = tempfile.NamedTemporaryFile(delete=False)
|
||||
tempFile.write(cqCodePane.toPlainText().encode('utf-8'))
|
||||
|
|
|
@ -15,9 +15,7 @@ def show(cqObject, rgba=(204, 204, 204, 0.0)):
|
|||
# Grab our code editor so we can interact with it
|
||||
cqCodePane = Shared.getActiveCodePane()
|
||||
|
||||
# Clear the old render before re-rendering
|
||||
Shared.clearActiveDocument()
|
||||
|
||||
if cqCodePane != None:
|
||||
# Save our code to a tempfile and render it
|
||||
tempFile = tempfile.NamedTemporaryFile(delete=False)
|
||||
tempFile.write(cqCodePane.toPlainText().encode('utf-8'))
|
||||
|
|
Loading…
Reference in New Issue
Block a user