Skip to content

Commit

Permalink
Keep track of all currently open instances of 'BaseMayaWindow'.
Browse files Browse the repository at this point in the history
Issue #222
  • Loading branch information
david-cattermole committed Jul 4, 2021
1 parent 06e8360 commit 3c9a43b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/mmSolver/ui/base_maya_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def apply(self):


LOG = mmSolver.logger.get_logger()
ALL_CLASS_INSTANCES = set()


class BaseMayaWindow(MayaQWidgetDockableMixin,
Expand All @@ -75,6 +76,9 @@ def __init__(self, parent, name=None):
super(BaseMayaWindow, self).__init__()
self.windowGeometry = None

global ALL_CLASS_INSTANCES
ALL_CLASS_INSTANCES.add(self)

# Destroy this widget when closed. Otherwise it will stay around.
self.setAttribute(QtCore.Qt.WA_DeleteOnClose, True)

Expand Down

0 comments on commit 3c9a43b

Please sign in to comment.