Skip to content

Commit

Permalink
Merge pull request #67 from mottosso/master
Browse files Browse the repository at this point in the history
Update Qt.py
  • Loading branch information
mottosso authored Jan 21, 2017
2 parents 9365155 + 07d2bf6 commit b81e6ed
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
7 changes: 6 additions & 1 deletion pyblish_maya/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,12 @@ def show():
"""

return (_discover_gui() or _show_no_gui)()
parent = next(
o for o in QtWidgets.QApplication.instance().topLevelWidgets()
if o.objectName() == "MayaWindow"
)

return (_discover_gui() or _show_no_gui)(parent)


def _discover_gui():
Expand Down
6 changes: 3 additions & 3 deletions pyblish_maya/vendor/Qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
self.__modified__ = list() # Existing members modified in some way

# Below members are set dynamically on import relative the original binding.
self.__version__ = "0.6.8"
self.__version__ = "0.6.9"
self.__qt_version__ = "0.0.0"
self.__binding__ = "None"
self.__binding_version__ = "0.0.0"
Expand Down Expand Up @@ -124,7 +124,7 @@ def _remap(object, name, value, safe=True):
"""

if QT_TESTING is not None and safe:
if QT_TESTING and safe:
# Cannot alter original binding.
if hasattr(object, name):
raise AttributeError("Cannot override existing name: "
Expand Down Expand Up @@ -443,4 +443,4 @@ def _maintain_backwards_compatibility(binding):
self.__added__.append("__wrapper_version__")


cli(sys.argv[1:]) if __name__ == "__main__" else init()
cli(sys.argv[1:]) if __name__ == "__main__" else init()
2 changes: 1 addition & 1 deletion pyblish_maya/version.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

VERSION_MAJOR = 2
VERSION_MINOR = 1
VERSION_PATCH = 3
VERSION_PATCH = 4

version_info = (VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH)
version = '%i.%i.%i' % version_info
Expand Down

0 comments on commit b81e6ed

Please sign in to comment.