Skip to content

Commit

Permalink
Remove unnecessary _getHeldObject calls. Refs #5222
Browse files Browse the repository at this point in the history
The returns from the GUI calls should do the expected thing now.
  • Loading branch information
martyngigg committed May 2, 2012
1 parent 8f1d75e commit 685d8e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ def set_state(self, state):
ws_name = "reflectivity"
ws_list = [n for n in mtd.keys() if n.startswith(ws_name)]
g = mantidplot.graph(ws_name)
if g._getHeldObject() is None and len(ws_list)>0:
if g is None and len(ws_list)>0:
g = mantidplot.plotSpectrum(ws_list,[0],True)
g.setName(ws_name)

Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/scripts/LargeScaleStructures/data_stitching.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def connect(self, ws, call_back, xmin=None, xmax=None,
self._call_back)
g = mantidplot.graph(self._graph)

if g._getHeldObject is not None:
if g is not None:
g.close()

g = mantidplot.plotSpectrum(ws, [0], True)
Expand Down

0 comments on commit 685d8e6

Please sign in to comment.