Close window interface in Plot

This commit is contained in:
jriegel
2014-04-27 18:12:02 +02:00
parent 39cd059e1b
commit da4d97ca95

View File

@@ -80,7 +80,20 @@ def getPlot():
return i
return None
def closePlot():
""" closePlot(): Close the active plot window. """
# Get active tab
mdi = getMdiArea()
if not mdi:
return None
sub = mdi.activeSubWindow()
if not sub:
return None
# Explore childrens looking for Plot class
for i in sub.children():
if i.metaObject().className() == "Plot":
sub.close()
def figure(winTitle="plot"):
"""Create a new plot subwindow/tab.