- created the GUI for the Rule Check Tool

- if there are (x, y) coordinates in the clipboard, when launching the "Jump to" function, those coordinates will be preloaded in the Dialog box.
- when the combo SHIFT + LMB is executed there is no longer a deselection of objects
- when the "Jump to" function is called, the mouse cursor (if active) will be moved to the new position and the screen position labels will be updated accordingly
- changed the icon for Open Script and reused it for the Check Rules Tool
This commit is contained in:
Marius Stanciu
2019-09-28 00:34:18 +03:00
committed by Marius
parent 7f4115267a
commit c5ecc7ad88
8 changed files with 826 additions and 727 deletions

View File

@@ -1734,21 +1734,26 @@ class FCDoubleSpinner(QtWidgets.QDoubleSpinBox):
class Dialog_box(QtWidgets.QWidget):
def __init__(self, title=None, label=None, icon=None):
def __init__(self, title=None, label=None, icon=None, initial_text=None):
"""
:param title: string with the window title
:param label: string with the message inside the dialog box
"""
super(Dialog_box, self).__init__()
self.location = (0, 0)
if initial_text is None:
self.location = str((0, 0))
else:
self.location = initial_text
self.ok = False
dialog_box = QtWidgets.QInputDialog()
dialog_box.setMinimumWidth(290)
self.dialog_box = QtWidgets.QInputDialog()
self.dialog_box.setMinimumWidth(290)
self.setWindowIcon(icon)
self.location, self.ok = dialog_box.getText(self, title, label, text="0, 0")
self.location, self.ok = self.dialog_box.getText(self, title, label,
text=str(self.location).replace('(', '').replace(')', ''))
self.readyToEdit = True
def mousePressEvent(self, e, parent=None):