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

- changed the default way to copy the coordinates to clipboard. Before,
at each mouse click on canvaas the coordinates were copied to clipboard.
Now for the same feet it require to have the CTRL key pressed while
clicking on canvas for the coordinates to be copied.

Marius Stanciu 7 лет назад
Родитель
Сommit
aff21d7cb0
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      FlatCAMApp.py

+ 3 - 2
FlatCAMApp.py

@@ -1639,8 +1639,9 @@ class App(QtCore.QObject):
         try:
         try:
             App.log.debug('button=%d, x=%d, y=%d, xdata=%f, ydata=%f' % (
             App.log.debug('button=%d, x=%d, y=%d, xdata=%f, ydata=%f' % (
                 event.button, event.x, event.y, event.xdata, event.ydata))
                 event.button, event.x, event.y, event.xdata, event.ydata))
-
-            self.clipboard.setText(self.defaults["point_clipboard_format"] % (event.xdata, event.ydata))
+            modifiers = QtGui.QApplication.keyboardModifiers()
+            if modifiers == QtCore.Qt.ControlModifier:
+                self.clipboard.setText(self.defaults["point_clipboard_format"] % (event.xdata, event.ydata))
 
 
         except Exception, e:
         except Exception, e:
             App.log.debug("Outside plot?")
             App.log.debug("Outside plot?")