Skip to content

Commit 8fc229f

Browse files
authored
[TOF] Fix crashing when updating plots (#2652)
* Fix for crash when updating plot * fix
1 parent 5361880 commit 8fc229f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Modules/TOF/src/TrendingCalibDiagnostics.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,8 @@ void TrendingCalibDiagnostics::generatePlots()
214214
// After the update, the title has a different size and it is not in the center anymore. We have to fix that.
215215
if (auto title = dynamic_cast<TPaveText*>(c->GetPrimitive("title"))) {
216216
title->SetBBoxCenterX(c->GetBBoxCenter().fX);
217-
// It will have an effect only after invoking Draw again.
218-
title->Draw();
217+
c->Modified();
218+
c->Update();
219219
} else {
220220
ILOG(Error, Devel) << "Could not get the title TPaveText of the plot '" << plot.name << "'." << ENDM;
221221
}

Modules/TOF/src/TrendingCalibLHCphase.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ void TrendingCalibLHCphase::generatePlots()
184184
// After the update, the title has a different size and it is not in the center anymore. We have to fix that.
185185
if (auto title = dynamic_cast<TPaveText*>(c->GetPrimitive("title"))) {
186186
title->SetBBoxCenterX(c->GetBBoxCenter().fX);
187-
// It will have an effect only after invoking Draw again.
188-
title->Draw();
187+
c->Modified();
188+
c->Update();
189189
} else {
190190
ILOG(Error, Devel) << "Could not get the title TPaveText of the plot '" << plot.name << "'." << ENDM;
191191
}

0 commit comments

Comments
 (0)