Close window interface in Plot

This commit is contained in:
jriegel 2014-04-27 18:12:02 +02:00
parent c64b169164
commit 93fc937bd1

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.