Explorar o código

- made sure that the object selection will not work while in Editors or in the App Tools
- some minor changes to strings and icons

Marius Stanciu %!s(int64=5) %!d(string=hai) anos
pai
achega
2cff6dc854
Modificáronse 3 ficheiros con 12 adicións e 7 borrados
  1. 2 0
      CHANGELOG.md
  2. 3 3
      appGUI/MainGUI.py
  3. 7 4
      app_Main.py

+ 2 - 0
CHANGELOG.md

@@ -14,6 +14,8 @@ CHANGELOG for FlatCAM beta
 - fixed the Tcl COmmand Panelize, Excellon panelization section
 - Fixed an issue in Tool Calibration export_excellon method call
 - PEP8 corrections all over the app
+- made sure that the object selection will not work while in Editors or in the App Tools
+- some minor changes to strings and icons
 
 1.11.2020
 

+ 3 - 3
appGUI/MainGUI.py

@@ -342,8 +342,8 @@ class MainGUI(QtWidgets.QMainWindow):
             QtGui.QIcon(self.app.resource_location + '/edit16.png'),
             '%s\t%s' % (_('Edit Object'), _('E')))
         self.menueditok = self.menuedit.addAction(
-            QtGui.QIcon(self.app.resource_location + '/edit_ok16.png'),
-            '%s\t%s' % (_('Close Editor'), _('Ctrl+S')))
+            QtGui.QIcon(self.app.resource_location + '/power16.png'),
+            '%s\t%s' % (_('Exit Editor'), _('Ctrl+S')))
 
         # adjust the initial state of the menu entries related to the editor
         self.menueditedit.setDisabled(False)
@@ -1693,7 +1693,7 @@ class MainGUI(QtWidgets.QMainWindow):
         self.popmenu_edit = self.popMenu.addAction(
             QtGui.QIcon(self.app.resource_location + '/edit32.png'), _("Edit"))
         self.popmenu_save = self.popMenu.addAction(
-            QtGui.QIcon(self.app.resource_location + '/floppy32.png'), _("Close Editor"))
+            QtGui.QIcon(self.app.resource_location + '/power16.png'), _("Exit Editor"))
         self.popmenu_save.setVisible(False)
         self.popMenu.addSeparator()
 

+ 7 - 4
app_Main.py

@@ -2357,7 +2357,6 @@ class App(QtCore.QObject):
         :return: None
         """
         self.defaults.report_usage("object2editor()")
-        self.log.debug("######################### Starting the EDITOR ################################")
         # disable the objects menu as it may interfere with the appEditors
         self.ui.menuobjects.setDisabled(True)
 
@@ -2469,6 +2468,7 @@ class App(QtCore.QObject):
 
         self.ui.plot_tab_area.setTabText(0, _("EDITOR Area"))
         self.ui.plot_tab_area.protectTab(0)
+        self.log.debug("######################### Starting the EDITOR ################################")
         self.inform.emit('[WARNING_NOTCL] %s' % _("Editor is activated ..."))
 
         self.should_we_save = True
@@ -2480,7 +2480,6 @@ class App(QtCore.QObject):
         :return: None
         """
         self.defaults.report_usage("editor2object()")
-        self.log.debug("######################### Closing the EDITOR ################################")
 
         # re-enable the objects menu that was disabled on entry in Editor mode
         self.ui.menuobjects.setDisabled(False)
@@ -2492,7 +2491,7 @@ class App(QtCore.QObject):
             if cleanup is None:
                 msgbox = QtWidgets.QMessageBox()
                 msgbox.setText(_("Do you want to save the edited object?"))
-                msgbox.setWindowTitle(_("Close Editor"))
+                msgbox.setWindowTitle(_("Exit Editor"))
                 msgbox.setWindowIcon(QtGui.QIcon(self.resource_location + '/save_as.png'))
                 msgbox.setIcon(QtWidgets.QMessageBox.Question)
 
@@ -2688,6 +2687,7 @@ class App(QtCore.QObject):
 
             # restore the call_source to app
             self.call_source = 'app'
+            self.log.debug("######################### Closing the EDITOR ################################")
 
             # edited_obj.plot()
             self.ui.plot_tab_area.setTabText(0, _("Plot Area"))
@@ -6634,6 +6634,10 @@ class App(QtCore.QObject):
                 self.inform.emit('[success] %s' % _("Coordinates copied to clipboard."))
                 return
 
+            # the object selection on canvas does not work for App Tools or for Editors
+            if self.call_source != 'app':
+                return
+
             if self.doubleclick is True:
                 self.doubleclick = False
                 if self.collection.get_selected():
@@ -6662,7 +6666,6 @@ class App(QtCore.QObject):
                         log.warning("FlatCAMApp.on_mouse_click_release_over_plot() select area --> Error: %s" % str(e))
                         return
                 else:
-
                     key_modifier = QtWidgets.QApplication.keyboardModifiers()
                     if key_modifier == QtCore.Qt.ShiftModifier:
                         mod_key = 'Shift'