moved fTriggerColor toggle state to the proper position.

This commit is contained in:
suter_a 2020-07-28 08:50:59 +02:00
parent ccb87e8b7a
commit ae105bacb4

View File

@ -1187,6 +1187,7 @@ void PMusrCanvas::HandleCmdKey(Int_t event, Int_t x, Int_t y, TObject *selected)
fMainCanvas->Update();
} else if (x == 't') { // toggle theory color
if (fData.size() == 1) { // only do something if there is a single data set
fToggleColor = !fToggleColor;
if (fToggleColor) {
fData[0].theory->SetLineColor(kRed);
fData[0].theory->SetLineWidth(2);
@ -1194,7 +1195,6 @@ void PMusrCanvas::HandleCmdKey(Int_t event, Int_t x, Int_t y, TObject *selected)
fData[0].theory->SetLineColor(fColorList[0]);
fData[0].theory->SetLineWidth(1);
}
fToggleColor = !fToggleColor;
fDataTheoryPad->Modified();
fMainCanvas->Update();
}