Skip to content

Commit

Permalink
Re #11386 Fix new plot policy
Browse files Browse the repository at this point in the history
  • Loading branch information
raquelalvarezbanos committed Mar 18, 2015
1 parent 3f9eae9 commit 97d8e66
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions Code/Mantid/MantidQt/CustomInterfaces/src/Muon/MuonAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1999,15 +1999,12 @@ void MuonAnalysis::plotSpectrum(const QString& wsName, bool logScale)
{
QStringList& s = acquireWindowScript; // To keep short

s << "w = graph('%WSNAME%-1')";
s << "if w == None:";
s << " pw = newGraph('%WSNAME%', 0)";
s << " w = plotSpectrum('%WSNAME%', 0, %ERRORS%, %CONNECT%, window = pw)";
s << " w.setObjectName('%WSNAME%')";
s << "else:";
s << " plotSpectrum('%WSNAME%', 0, %ERRORS%, %CONNECT%, window = w, clearWindow = True)";
s << " w.show()";
s << " w.setFocus()";
s << "pw = newGraph('%WSNAME%-1', 0)";
s << "w = plotSpectrum('%WSNAME%', 0, %ERRORS%, %CONNECT%, window = pw, clearWindow = True)";
s << "w.setName('%WSNAME%-1')";
s << "w.setObjectName('%WSNAME%')";
s << "w.show()";
s << "w.setFocus()";
}

QString pyS;
Expand Down

0 comments on commit 97d8e66

Please sign in to comment.