فهرست منبع

- fixed issue with not updating correctly the plot kind (all, cut, travel) when clicking in the CNC Tools Table plot buttons
- made the GCode Editor for ToolSolderPaste clear the text before updating the Code Editor tab
- all the Tabs in Plot Area are closed (except Plot Area itself) on New Project creation

Marius Stanciu 7 سال پیش
والد
کامیت
45b5cba68a
4فایلهای تغییر یافته به همراه19 افزوده شده و 1 حذف شده
  1. 10 0
      FlatCAMApp.py
  2. 3 1
      FlatCAMObj.py
  3. 3 0
      README.md
  4. 3 0
      flatcamTools/ToolSolderPaste.py

+ 10 - 0
FlatCAMApp.py

@@ -4829,6 +4829,16 @@ class App(QtCore.QObject):
         # Init Tools
         # Init Tools
         self.init_tools()
         self.init_tools()
 
 
+        # Close any Tabs opened in the Plot Tab Area section
+        for index in range(self.ui.plot_tab_area.count()):
+            self.ui.plot_tab_area.closeTab(index)
+            # for whatever reason previous command does not close the last tab so I do it manually
+        self.ui.plot_tab_area.closeTab(0)
+
+        # # And then add again the Plot Area
+        self.ui.plot_tab_area.addTab(self.ui.plot_tab, "Plot Area")
+        self.ui.plot_tab_area.protectTab(0)
+
         # take the focus of the Notebook on Project Tab.
         # take the focus of the Notebook on Project Tab.
         self.ui.notebook.setCurrentWidget(self.ui.project_tab)
         self.ui.notebook.setCurrentWidget(self.ui.project_tab)
 
 

+ 3 - 1
FlatCAMObj.py

@@ -5199,6 +5199,8 @@ class FlatCAMCNCjob(FlatCAMObj, CNCjob):
         cw_index = self.ui.cnc_tools_table.indexAt(cw.pos())
         cw_index = self.ui.cnc_tools_table.indexAt(cw.pos())
         cw_row = cw_index.row()
         cw_row = cw_index.row()
 
 
+        kind = self.ui.cncplot_method_combo.get_value()
+
         self.shapes.clear(update=True)
         self.shapes.clear(update=True)
 
 
         for tooluid_key in self.cnc_tools:
         for tooluid_key in self.cnc_tools:
@@ -5209,7 +5211,7 @@ class FlatCAMCNCjob(FlatCAMObj, CNCjob):
             for r in range(self.ui.cnc_tools_table.rowCount()):
             for r in range(self.ui.cnc_tools_table.rowCount()):
                 if int(self.ui.cnc_tools_table.item(r, 5).text()) == int(tooluid_key):
                 if int(self.ui.cnc_tools_table.item(r, 5).text()) == int(tooluid_key):
                     if self.ui.cnc_tools_table.cellWidget(r, 6).isChecked():
                     if self.ui.cnc_tools_table.cellWidget(r, 6).isChecked():
-                        self.plot2(tooldia=tooldia, obj=self, visible=True, gcode_parsed=gcode_parsed)
+                        self.plot2(tooldia=tooldia, obj=self, visible=True, gcode_parsed=gcode_parsed, kind=kind)
 
 
         self.shapes.redraw()
         self.shapes.redraw()
 
 

+ 3 - 0
README.md

@@ -20,6 +20,9 @@ CAD program, and create G-Code for Isolation routing.
 - ToolSolderPaste tools (nozzles) now have each it's own settings
 - ToolSolderPaste tools (nozzles) now have each it's own settings
 - creating the camlib functions for the ToolSolderPaste gcode generation functions
 - creating the camlib functions for the ToolSolderPaste gcode generation functions
 - finished work in ToolSolderPaste
 - finished work in ToolSolderPaste
+- fixed issue with not updating correctly the plot kind (all, cut, travel) when clicking in the CNC Tools Table plot buttons
+- made the GCode Editor for ToolSolderPaste clear the text before updating the Code Editor tab
+- all the Tabs in Plot Area are closed (except Plot Area itself) on New Project creation
 
 
 20.02.2019
 20.02.2019
 
 

+ 3 - 0
flatcamTools/ToolSolderPaste.py

@@ -954,6 +954,9 @@ class SolderPaste(FlatCAMTool):
         # add the tab if it was closed
         # add the tab if it was closed
         self.app.ui.plot_tab_area.addTab(self.app.ui.cncjob_tab, "Code Editor")
         self.app.ui.plot_tab_area.addTab(self.app.ui.cncjob_tab, "Code Editor")
 
 
+        # first clear previous text in text editor (if any)
+        self.app.ui.code_editor.clear()
+
         # Switch plot_area to CNCJob tab
         # Switch plot_area to CNCJob tab
         self.app.ui.plot_tab_area.setCurrentWidget(self.app.ui.cncjob_tab)
         self.app.ui.plot_tab_area.setCurrentWidget(self.app.ui.cncjob_tab)