Fix StepDialog parent reference to improve image handling functionality
This commit is contained in:
@@ -501,7 +501,7 @@ class StepDialog(QtWidgets.QDialog):
|
|||||||
|
|
||||||
|
|
||||||
def add_image_to_step(self):
|
def add_image_to_step(self):
|
||||||
main_window = self.parent().parent()
|
main_window = self.parent()
|
||||||
step_name = self.name_edit.text()
|
step_name = self.name_edit.text()
|
||||||
if not step_name:
|
if not step_name:
|
||||||
QtWidgets.QMessageBox.warning(self, "Step Name Required", "Please enter a name for the step before adding an image.")
|
QtWidgets.QMessageBox.warning(self, "Step Name Required", "Please enter a name for the step before adding an image.")
|
||||||
@@ -577,7 +577,7 @@ class StepDialog(QtWidgets.QDialog):
|
|||||||
if idx < 0:
|
if idx < 0:
|
||||||
return
|
return
|
||||||
|
|
||||||
main_window = self.parent().parent()
|
main_window = self.parent()
|
||||||
self.hide()
|
self.hide()
|
||||||
main_window.hide()
|
main_window.hide()
|
||||||
time.sleep(0.3)
|
time.sleep(0.3)
|
||||||
|
|||||||
Reference in New Issue
Block a user