From d65b04e855188affffe5b8219f0be94e089ef6e3 Mon Sep 17 00:00:00 2001 From: Andreas Suter Date: Mon, 17 Feb 2025 17:53:39 +0100 Subject: [PATCH] this is a workaround which should prevent that the key event is executed if a text/latex is written into the canvas. --- src/classes/PMusrCanvas.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/classes/PMusrCanvas.cpp b/src/classes/PMusrCanvas.cpp index c9ac362f..73a810f3 100644 --- a/src/classes/PMusrCanvas.cpp +++ b/src/classes/PMusrCanvas.cpp @@ -937,7 +937,13 @@ void PMusrCanvas::Done(Int_t status) void PMusrCanvas::HandleCmdKey(Int_t event, Int_t x, Int_t y, TObject *selected) { if (event != kKeyPress) - return; + return; + + // this is a workaround which should prevent that the key event is executed if + // a text/latex is written into the canvas. + if (!strcmp(selected->GetTitle(), "dataTheoryPad")) + return; + if (fBatchMode) { if (fStartWithAvg) { // this is needed to get the averaging in the batch mode