From fb240753ac658ecd4fcc9b345e877f5000fb4dfa Mon Sep 17 00:00:00 2001 From: Jeremy Mack Wright Date: Fri, 28 Dec 2018 06:21:30 -0500 Subject: [PATCH] Added capability to execute the script when the external editor saves it. --- CodeEditor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CodeEditor.py b/CodeEditor.py index ee4fd57..1a8a695 100644 --- a/CodeEditor.py +++ b/CodeEditor.py @@ -4,6 +4,7 @@ from PySide import QtCore from PySide.QtCore import QSize, QRect, Qt, QRegExp from PySide.QtGui import QPainter, QSyntaxHighlighter, QTextCharFormat, QFont, QColor, QTextCursor, QPlainTextEdit, QTextEdit, QWidget from FinderOverlay import FinderOverlay +import CQGui.Command class LineNumberArea(QWidget): def __init__(self, parent): @@ -113,6 +114,8 @@ class CodeEditor(QPlainTextEdit): self.setPlainText(self.file_contents) + CQGui.Command.CadQueryExecuteScript().Activated() + # Tells whether or not the contents of the file we're working with has changed def changedOnDisk(self): with open(self.file_path) as f: file_contents = f.read()