Просмотр исходного кода

- in the TCL completer if the word is already complete don't add it again but add a space

Marius Stanciu 6 лет назад
Родитель
Сommit
f8cbafe84d
3 измененных файлов с 28 добавлено и 1 удалено
  1. 9 1
      FlatCAMApp.py
  2. 5 0
      README.md
  3. 14 0
      flatcamGUI/GUIElements.py

+ 9 - 1
FlatCAMApp.py

@@ -91,7 +91,7 @@ class App(QtCore.QObject):
 
     # Version
     version = 8.913
-    version_date = "2019/03/23"
+    version_date = "2019/03/25"
     beta = True
 
     # current date now
@@ -5835,6 +5835,14 @@ class App(QtCore.QObject):
             "# CREATE A NEW FLATCAM TCL SCRIPT\n"
             "# TCL Tutorial here: https://www.tcl.tk/man/tcl8.5/tutorial/tcltutorial.html\n"
             "#\n\n"
+            "# FlatCAM commands list:\n"
+            "# AddCircle, AddPolygon, AddPolyline, AddRectangle, AlignDrill, AlignDrillGrid, ClearShell, Cncjob,\n"
+            "# Cutout, Delete, Drillcncjob, ExportGcode, ExportSVG, Exteriors, GeoCutout, GeoUnion, GetNames, GetSys,\n"
+            "# ImportSvg, Interiors, Isolate, Follow, JoinExcellon, JoinGeometry, ListSys, MillHoles, Mirror, New,\n"
+            "# NewGeometry, Offset, OpenExcellon, OpenGCode, OpenGerber, OpenProject, Options, Paint, Panelize,\n"
+            "# Plot, SaveProject, SaveSys, Scale, SetActive, SetSys, Skew, SubtractPoly,SubtractRectangle, Version,\n"
+            "# WriteGCode\n"
+            "#\n\n"
         ))
 
         self.ui.buttonOpen.clicked.connect(lambda: self.handleOpen(filt=flt))

+ 5 - 0
README.md

@@ -9,6 +9,11 @@ CAD program, and create G-Code for Isolation routing.
 
 =================================================
 
+25.03.2019
+
+- in the TCL completer if the word is already complete don't add it again but add a space
+
+
 22.03.2019
 
 - fixed an error that created a situation that when saving a project with some of the CNCJob objects disabled, on project reload the CNCJob objects are no longer loaded

+ 14 - 0
flatcamGUI/GUIElements.py

@@ -509,6 +509,13 @@ class FCTextAreaExtended(QtWidgets.QTextEdit):
     def insertCompletion(self, completion):
         tc = self.textCursor()
         extra = (len(completion) - len(self.completer.completionPrefix()))
+
+        # don't insert if the word is finished but add a space instead
+        if extra == 0:
+            tc.insertText(' ')
+            self.completer.popup().hide()
+            return
+
         tc.movePosition(QTextCursor.Left)
         tc.movePosition(QTextCursor.EndOfWord)
         tc.insertText(completion[-extra:])
@@ -1454,6 +1461,13 @@ class _ExpandableTextEdit(QTextEdit):
     def insertCompletion(self, completion):
         tc = self.textCursor()
         extra = (len(completion) - len(self.completer.completionPrefix()))
+
+        # don't insert if the word is finished but add a space instead
+        if extra == 0:
+            tc.insertText(' ')
+            self.completer.popup().hide()
+            return
+
         tc.movePosition(QTextCursor.Left)
         tc.movePosition(QTextCursor.EndOfWord)
         tc.insertText(completion[-extra:])