Преглед изворни кода

- modified the way key modifiers are detected in Gerber Editor Selection class and in Excellon Editor Selection class
- updated the translations

Marius Stanciu пре 6 година
родитељ
комит
4ca15b486b

+ 2 - 0
README.md

@@ -21,6 +21,8 @@ CAD program, and create G-Code for Isolation routing.
 - modified the NCC Tool and Paint Tool to work multiple times after first launch
 - modified the NCC Tool and Paint Tool to work multiple times after first launch
 - fixed the issue with GUI entries content being deselected on right click in the box in order to copy the value
 - fixed the issue with GUI entries content being deselected on right click in the box in order to copy the value
 - some changes in GUI tooltips
 - some changes in GUI tooltips
+- modified the way key modifiers are detected in Gerber Editor Selection class and in Excellon Editor Selection class
+- updated the translations
 
 
 22.08.2019
 22.08.2019
 
 

+ 11 - 9
flatcamEditors/FlatCAMExcEditor.py

@@ -1261,16 +1261,18 @@ class FCDrillSelect(DrawTool):
 
 
     def click(self, point):
     def click(self, point):
         key_modifier = QtWidgets.QApplication.keyboardModifiers()
         key_modifier = QtWidgets.QApplication.keyboardModifiers()
-        if self.exc_editor_app.app.defaults["global_mselect_key"] == 'Control':
-            if key_modifier == Qt.ControlModifier:
-                pass
-            else:
-                self.exc_editor_app.selected = []
+
+        if key_modifier == QtCore.Qt.ShiftModifier:
+            mod_key = 'Shift'
+        elif key_modifier == QtCore.Qt.ControlModifier:
+            mod_key = 'Control'
         else:
         else:
-            if key_modifier == Qt.ShiftModifier:
-                pass
-            else:
-                self.exc_editor_app.selected = []
+            mod_key = None
+
+        if mod_key == self.draw_app.app.defaults["global_mselect_key"]:
+            pass
+        else:
+            self.exc_editor_app.selected = []
 
 
     def click_release(self, pos):
     def click_release(self, pos):
         self.exc_editor_app.tools_table_exc.clearSelection()
         self.exc_editor_app.tools_table_exc.clearSelection()

+ 19 - 14
flatcamEditors/FlatCAMGrbEditor.py

@@ -2214,33 +2214,38 @@ class FCApertureSelect(DrawTool):
 
 
     def click(self, point):
     def click(self, point):
         key_modifier = QtWidgets.QApplication.keyboardModifiers()
         key_modifier = QtWidgets.QApplication.keyboardModifiers()
-        if self.grb_editor_app.app.defaults["global_mselect_key"] == 'Control':
-            if key_modifier == Qt.ControlModifier:
-                pass
-            else:
-                self.grb_editor_app.selected = []
+
+        if key_modifier == QtCore.Qt.ShiftModifier:
+            mod_key = 'Shift'
+        elif key_modifier == QtCore.Qt.ControlModifier:
+            mod_key = 'Control'
         else:
         else:
-            if key_modifier == Qt.ShiftModifier:
-                pass
-            else:
-                self.grb_editor_app.selected = []
+            mod_key = None
+
+        if mod_key == self.draw_app.app.defaults["global_mselect_key"]:
+            pass
+        else:
+            self.grb_editor_app.selected = []
 
 
     def click_release(self, point):
     def click_release(self, point):
         self.grb_editor_app.apertures_table.clearSelection()
         self.grb_editor_app.apertures_table.clearSelection()
         sel_aperture = set()
         sel_aperture = set()
         key_modifier = QtWidgets.QApplication.keyboardModifiers()
         key_modifier = QtWidgets.QApplication.keyboardModifiers()
 
 
+        if key_modifier == QtCore.Qt.ShiftModifier:
+            mod_key = 'Shift'
+        elif key_modifier == QtCore.Qt.ControlModifier:
+            mod_key = 'Control'
+        else:
+            mod_key = None
+
         for storage in self.grb_editor_app.storage_dict:
         for storage in self.grb_editor_app.storage_dict:
             try:
             try:
                 for geo_el in self.grb_editor_app.storage_dict[storage]['geometry']:
                 for geo_el in self.grb_editor_app.storage_dict[storage]['geometry']:
                     if 'solid' in geo_el.geo:
                     if 'solid' in geo_el.geo:
                         geometric_data = geo_el.geo['solid']
                         geometric_data = geo_el.geo['solid']
                         if Point(point).within(geometric_data):
                         if Point(point).within(geometric_data):
-                            if (self.grb_editor_app.app.defaults["global_mselect_key"] == 'Control' and
-                                key_modifier == Qt.ControlModifier) or \
-                                    (self.grb_editor_app.app.defaults["global_mselect_key"] == 'Shift' and
-                                     key_modifier == Qt.ShiftModifier):
-
+                            if mod_key == self.grb_editor_app.app.defaults["global_mselect_key"]:
                                 if geo_el in self.draw_app.selected:
                                 if geo_el in self.draw_app.selected:
                                     self.draw_app.selected.remove(geo_el)
                                     self.draw_app.selected.remove(geo_el)
                                 else:
                                 else:

+ 1 - 1
flatcamGUI/FlatCAMGUI.py

@@ -3985,7 +3985,7 @@ class GeneralAppPrefGroupUI(OptionsGroupUI):
                                          {'label': _('Advanced'), 'value': 'a'}])
                                          {'label': _('Advanced'), 'value': 'a'}])
 
 
         # Application Level for FlatCAM
         # Application Level for FlatCAM
-        self.portability_label = QtWidgets.QLabel('%s:' % _('Portability'))
+        self.portability_label = QtWidgets.QLabel('%s:' % _('Portable app'))
         self.portability_label.setToolTip(_("Choose if the application should run as portable.\n\n"
         self.portability_label.setToolTip(_("Choose if the application should run as portable.\n\n"
                                             "If Checked the application will run portable,\n"
                                             "If Checked the application will run portable,\n"
                                             "which means that the preferences files will be saved\n"
                                             "which means that the preferences files will be saved\n"

BIN
locale/de/LC_MESSAGES/strings.mo


Разлика између датотеке није приказан због своје велике величине
+ 198 - 193
locale/de/LC_MESSAGES/strings.po


BIN
locale/en/LC_MESSAGES/strings.mo


Разлика између датотеке није приказан због своје велике величине
+ 203 - 198
locale/en/LC_MESSAGES/strings.po


BIN
locale/es/LC_MESSAGES/strings.mo


Разлика између датотеке није приказан због своје велике величине
+ 197 - 192
locale/es/LC_MESSAGES/strings.po


BIN
locale/pt_BR/LC_MESSAGES/strings.mo


Разлика између датотеке није приказан због своје велике величине
+ 203 - 198
locale/pt_BR/LC_MESSAGES/strings.po


BIN
locale/ro/LC_MESSAGES/strings.mo


Разлика између датотеке није приказан због своје велике величине
+ 203 - 198
locale/ro/LC_MESSAGES/strings.po


BIN
locale/ru/LC_MESSAGES/strings.mo


Разлика између датотеке није приказан због своје велике величине
+ 203 - 198
locale/ru/LC_MESSAGES/strings.po


Разлика између датотеке није приказан због своје велике величине
+ 255 - 250
locale_template/strings.pot


Неке датотеке нису приказане због велике количине промена