diff --git a/Modules/TOF/src/TrendingCalibDiagnostics.cxx b/Modules/TOF/src/TrendingCalibDiagnostics.cxx index 1c9df08ca..fc912c881 100644 --- a/Modules/TOF/src/TrendingCalibDiagnostics.cxx +++ b/Modules/TOF/src/TrendingCalibDiagnostics.cxx @@ -214,8 +214,8 @@ void TrendingCalibDiagnostics::generatePlots() // After the update, the title has a different size and it is not in the center anymore. We have to fix that. if (auto title = dynamic_cast(c->GetPrimitive("title"))) { title->SetBBoxCenterX(c->GetBBoxCenter().fX); - // It will have an effect only after invoking Draw again. - title->Draw(); + c->Modified(); + c->Update(); } else { ILOG(Error, Devel) << "Could not get the title TPaveText of the plot '" << plot.name << "'." << ENDM; } diff --git a/Modules/TOF/src/TrendingCalibLHCphase.cxx b/Modules/TOF/src/TrendingCalibLHCphase.cxx index bc14c8b34..2b73942b4 100644 --- a/Modules/TOF/src/TrendingCalibLHCphase.cxx +++ b/Modules/TOF/src/TrendingCalibLHCphase.cxx @@ -184,8 +184,8 @@ void TrendingCalibLHCphase::generatePlots() // After the update, the title has a different size and it is not in the center anymore. We have to fix that. if (auto title = dynamic_cast(c->GetPrimitive("title"))) { title->SetBBoxCenterX(c->GetBBoxCenter().fX); - // It will have an effect only after invoking Draw again. - title->Draw(); + c->Modified(); + c->Update(); } else { ILOG(Error, Devel) << "Could not get the title TPaveText of the plot '" << plot.name << "'." << ENDM; }