(i) when exporting Fourier, and _F is added. (ii) the average flag is now also properly propageted in the batch mode.

This commit is contained in:
suter_a 2018-03-26 12:50:45 +02:00
parent d34d1b9679
commit f843d61bbb

View File

@ -1014,8 +1014,13 @@ void PMusrCanvas::HandleCmdKey(Int_t event, Int_t x, Int_t y, TObject *selected)
if (event != kKeyPress) if (event != kKeyPress)
return; return;
if (fBatchMode) if (fBatchMode) {
if (fStartWithAvg) { // this is needed to get the averaging in the batch mode
HandleAverage();
PlotAverage(true);
}
return; return;
}
// handle keys and popup menu entries // handle keys and popup menu entries
enum eKeySwitch {kNotRelevant, kData, kDiffData, kFourier, kDiffFourier, kFourierDiff}; enum eKeySwitch {kNotRelevant, kData, kDiffData, kFourier, kDiffFourier, kFourierDiff};
@ -1553,7 +1558,10 @@ void PMusrCanvas::SaveGraphicsAndQuit(Char_t *fileName, Char_t *graphicsFormat)
return; return;
} }
sprintf(ext, "_%d", fPlotNumber); if (fStartWithFourier)
sprintf(ext, "_%d_F", fPlotNumber);
else
sprintf(ext, "_%d", fPlotNumber);
str.Replace(idx, size, ext, strlen(ext)); str.Replace(idx, size, ext, strlen(ext));
idx += strlen(ext); idx += strlen(ext);
size = strlen(ext); size = strlen(ext);