Skip to content

Commit

Permalink
Fixed the problem with renaming in ADS.
Browse files Browse the repository at this point in the history
This was causing tests to fail.

Refs #7309
  • Loading branch information
arturbekasov committed Jul 26, 2013
1 parent a9351f2 commit eac1866
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Code/Mantid/scripts/Reflectometry/isis_reflgui/quick.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,13 @@ def cleanup():
DeleteWorkspace(name)

def coAdd(run,name):
names = mtd.getObjectNames()
wTof = "_W" + name # main workspace in time-of-flight
if run in names:
if mtd.doesExist(run):
# If ws with such name already exists, delete it, so
# RenameWorkspace will not complain
if mtd.doesExist(wTof):
mtd.remove(wTof)

RenameWorkspace(InputWorkspace=run,OutputWorkspace=wTof)
else:

Expand Down

0 comments on commit eac1866

Please sign in to comment.