added check for parent window

This commit is contained in:
wijnand 2018-06-28 18:45:58 +02:00
parent 024403ea69
commit 2e9a63c410

View file

@ -126,15 +126,17 @@ def on_save(_):
QtWidgets.QApplication.topLevelWidgets()}
parent = top_level_widgets.get("MayaWindow", None)
if parent is None:
pass
else:
dialog = popup.Popup(parent=parent)
dialog.setWindowTitle("Maya scene not in line with project")
dialog.setMessage("The FPS is out of sync, please fix")
# Set new text for button (add optional argument for the popup?)
dialog.widgets["show"].setText("Fix")
dialog.on_show.connect(lib.set_project_fps)
dialog = popup.Popup(parent=parent)
dialog.setWindowTitle("Maya scene not in line with project")
dialog.setMessage("The FPS is out of sync, please fix")
# Set new text for button (could be an optional argument for the popup)
dialog.widgets["show"].setText("Fix")
dialog.on_show.connect(lib.set_project_fps)
dialog.show()
dialog.show()
def on_open(_):