- default values for Jump To function is jumping to origin (0, 0)
This commit is contained in:
@@ -2088,8 +2088,6 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
||||
# Zoom Fit
|
||||
if key == QtCore.Qt.Key_V:
|
||||
self.app.on_zoom_fit(None)
|
||||
# and move mouse cursor to origin
|
||||
self.app.on_jump_to(custom_location=(0, 0))
|
||||
|
||||
# Mirror on X the selected object(s)
|
||||
if key == QtCore.Qt.Key_X:
|
||||
@@ -2355,8 +2353,6 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
||||
|
||||
if key == QtCore.Qt.Key_V or key == 'V':
|
||||
self.app.on_zoom_fit(None)
|
||||
# and move mouse cursor to origin
|
||||
self.app.on_jump_to(custom_location=(0, 0))
|
||||
|
||||
# Flip on X axis
|
||||
if key == QtCore.Qt.Key_X or key == 'X':
|
||||
@@ -2536,8 +2532,6 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
||||
if key == QtCore.Qt.Key_V or key == 'V':
|
||||
self.app.grb_editor.launched_from_shortcuts = True
|
||||
self.app.on_zoom_fit(None)
|
||||
# and move mouse cursor to origin
|
||||
self.app.on_jump_to(custom_location=(0, 0))
|
||||
return
|
||||
|
||||
# Propagate to tool
|
||||
@@ -2735,8 +2729,6 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
||||
if key == QtCore.Qt.Key_V or key == 'V':
|
||||
self.app.exc_editor.launched_from_shortcuts = True
|
||||
self.app.on_zoom_fit(None)
|
||||
# and move mouse cursor to origin
|
||||
self.app.on_jump_to(custom_location=(0, 0))
|
||||
return
|
||||
|
||||
# Propagate to tool
|
||||
|
||||
@@ -1463,7 +1463,20 @@ class Dialog_box(QtWidgets.QWidget):
|
||||
dialog_box.setFixedWidth(290)
|
||||
self.setWindowIcon(icon)
|
||||
|
||||
self.location, self.ok = dialog_box.getText(self, title, label)
|
||||
self.location, self.ok = dialog_box.getText(self, title, label, text="0, 0")
|
||||
self.readyToEdit = True
|
||||
|
||||
def mousePressEvent(self, e, parent=None):
|
||||
super(Dialog_box, self).mousePressEvent(e) # required to deselect on 2e click
|
||||
if self.readyToEdit:
|
||||
self.lineEdit().selectAll()
|
||||
self.readyToEdit = False
|
||||
|
||||
def focusOutEvent(self, e):
|
||||
super(Dialog_box, self).focusOutEvent(e) # required to remove cursor on focusOut
|
||||
self.lineEdit().deselect()
|
||||
self.readyToEdit = True
|
||||
|
||||
|
||||
|
||||
class _BrowserTextEdit(QTextEdit):
|
||||
|
||||
Reference in New Issue
Block a user