From ae105bacb455d0be96e1f123c94e21d959533da9 Mon Sep 17 00:00:00 2001 From: Andreas Suter Date: Tue, 28 Jul 2020 08:50:59 +0200 Subject: [PATCH] moved fTriggerColor toggle state to the proper position. --- src/classes/PMusrCanvas.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/classes/PMusrCanvas.cpp b/src/classes/PMusrCanvas.cpp index c1c6c465..1463a750 100644 --- a/src/classes/PMusrCanvas.cpp +++ b/src/classes/PMusrCanvas.cpp @@ -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(); }