- added a protection for the case that the aperture table is part of a deleted object
This commit is contained in:
@@ -13,6 +13,7 @@ CAD program, and create G-Code for Isolation routing.
|
||||
|
||||
- another fix for bug in clear geometry processing for Gerber apertures
|
||||
- added a protection for the case that the aperture table is part of a deleted object
|
||||
- in Script Editor added support for auto-add closing parenthesis, brace and bracket
|
||||
|
||||
4.05.2019
|
||||
|
||||
|
||||
@@ -576,6 +576,40 @@ class FCTextAreaExtended(QtWidgets.QTextEdit):
|
||||
self.completer.insertText.emit(self.completer.getSelected())
|
||||
self.completer.setCompletionMode(QCompleter.PopupCompletion)
|
||||
return
|
||||
elif key == Qt.Key_BraceLeft:
|
||||
tc.insertText('{}')
|
||||
self.moveCursor(QtGui.QTextCursor.Left)
|
||||
elif key == Qt.Key_BracketLeft:
|
||||
tc.insertText('[]')
|
||||
self.moveCursor(QtGui.QTextCursor.Left)
|
||||
elif key == Qt.Key_ParenLeft:
|
||||
tc.insertText('()')
|
||||
self.moveCursor(QtGui.QTextCursor.Left)
|
||||
|
||||
elif key == Qt.Key_BraceRight:
|
||||
tc.select(QtGui.QTextCursor.WordUnderCursor)
|
||||
if tc.selectedText() == '}':
|
||||
tc.movePosition(QTextCursor.Right)
|
||||
self.setTextCursor(tc)
|
||||
else:
|
||||
tc.clearSelection()
|
||||
self.textCursor().insertText('}')
|
||||
elif key == Qt.Key_BracketRight:
|
||||
tc.select(QtGui.QTextCursor.WordUnderCursor)
|
||||
if tc.selectedText() == ']':
|
||||
tc.movePosition(QTextCursor.Right)
|
||||
self.setTextCursor(tc)
|
||||
else:
|
||||
tc.clearSelection()
|
||||
self.textCursor().insertText(']')
|
||||
elif key == Qt.Key_ParenRight:
|
||||
tc.select(QtGui.QTextCursor.WordUnderCursor)
|
||||
if tc.selectedText() == ')':
|
||||
tc.movePosition(QTextCursor.Right)
|
||||
self.setTextCursor(tc)
|
||||
else:
|
||||
tc.clearSelection()
|
||||
self.textCursor().insertText(')')
|
||||
else:
|
||||
super(FCTextAreaExtended, self).keyPressEvent(event)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user