Sfoglia il codice sorgente

- if an object is edited but the result is not saved, the app will reload the edited object UI and set the Selected tab as active

Marius Stanciu 6 anni fa
parent
commit
7b9907fa1d
2 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 2 3
      FlatCAMApp.py
  2. 2 1
      README.md

+ 2 - 3
FlatCAMApp.py

@@ -2675,7 +2675,6 @@ class App(QtCore.QObject):
             args_to_process = App.args
 
         log.debug("Application was started with arguments: %s. Processing ..." % str(args_to_process))
-
         for argument in args_to_process:
             if '.FlatPrj'.lower() in argument.lower():
                 try:
@@ -2750,7 +2749,6 @@ class App(QtCore.QObject):
                     proc_ext = ext.replace(' ', '')
                     proc_ext = '.%s' % proc_ext
                     if proc_ext.lower() in proc_arg and proc_ext != '.':
-                        print(proc_ext, proc_arg)
                         file_name = str(argument)
                         if file_name == "":
                             if silent is False:
@@ -3239,11 +3237,12 @@ class App(QtCore.QObject):
                     elif isinstance(edited_obj, FlatCAMExcellon):
                         self.exc_editor.deactivate()
                         # set focus on the project tab
-                        self.ui.notebook.setCurrentWidget(self.ui.project_tab)
                     else:
                         self.inform.emit('[WARNING_NOTCL] %s' %
                                          _("Select a Gerber, Geometry or Excellon Object to update."))
                         return
+                    edited_obj.set_ui(edited_obj.ui_type())
+                    self.ui.notebook.setCurrentWidget(self.ui.selected_tab)
                 elif response == bt_cancel:
                     return
             else:

+ 2 - 1
README.md

@@ -12,10 +12,11 @@ CAD program, and create G-Code for Isolation routing.
 27.09.2019
 
 - optimized the toggle axis command
-- added posibility of using a big mouse cursor or a small mouse cursor. The big mouse cursor is made from 2 infinite lines. This was implemented for both graphic engines
+- added possibility of using a big mouse cursor or a small mouse cursor. The big mouse cursor is made from 2 infinite lines. This was implemented for both graphic engines
 - added ability to change the cursor size when the small mouse cursor is selected in Preferences -> General
 - removed the line that remove the spaces from the path parameter in the Tcl commands that open something (Gerber, Gcode, Excellon)
 - fixed issue with the old SysTray icon not hidden when the application is restarted programmatically
+- if an object is edited but the result is not saved, the app will reload the edited object UI and set the Selected tab as active
 
 27.09.2019