- default values for Jump To function is jumping to origin (0, 0)

This commit is contained in:
Marius Stanciu
2019-04-07 03:43:58 +03:00
parent 5ef11a56cc
commit 57176b7e28
4 changed files with 22 additions and 12 deletions

View File

@@ -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):