From 8ed53a307eeb4064d8a8065427151081d96fbafc Mon Sep 17 00:00:00 2001 From: Sergey Linev Date: Mon, 25 Nov 2024 10:51:40 +0100 Subject: [PATCH] [webcanv] do not warn when root or xml file should be created If in web mode root or xml file is created do not print warning --- graf2d/gpad/src/TCanvas.cxx | 3 ++- gui/webgui6/src/TWebCanvas.cxx | 10 ++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/graf2d/gpad/src/TCanvas.cxx b/graf2d/gpad/src/TCanvas.cxx index ea734c9347798..4cb3576a7b5ba 100644 --- a/graf2d/gpad/src/TCanvas.cxx +++ b/graf2d/gpad/src/TCanvas.cxx @@ -2710,7 +2710,8 @@ Bool_t TCanvas::SaveAll(const std::vector &pads, const char *filename, O return (Bool_t) gROOT->ProcessLine(cmd); } - ::Warning("TCanvas::SaveAll", "TWebCanvas does not support image format %s - use normal ROOT functionality", fname.Data()); + if ((ext != "root") && (ext != "xml")) + ::Warning("TCanvas::SaveAll", "TWebCanvas does not support image format %s - using normal ROOT functionality", fname.Data()); } // store all pads into single PDF/PS files diff --git a/gui/webgui6/src/TWebCanvas.cxx b/gui/webgui6/src/TWebCanvas.cxx index 63ba3633e2569..9527e5b6fa6a0 100644 --- a/gui/webgui6/src/TWebCanvas.cxx +++ b/gui/webgui6/src/TWebCanvas.cxx @@ -737,7 +737,7 @@ void TWebCanvas::CreatePadSnapshot(TPadWebSnapshot &paddata, TPad *pad, Long64_t } else if (obj->InheritsFrom(TGraph::Class())) { if (opt.Contains("A")) { need_frame = true; - if (!has_histo && (strlen(obj->GetTitle()) > 0)) + if (!has_histo && (strlen(obj->GetTitle()) > 0) && !obj->TestBit(TH1::kNoTitle)) need_title = obj->GetTitle(); } } else if (obj->InheritsFrom(TGraph2D::Class())) { @@ -748,9 +748,11 @@ void TWebCanvas::CreatePadSnapshot(TPadWebSnapshot &paddata, TPad *pad, Long64_t if (strlen(obj->GetTitle()) > 0) need_title = obj->GetTitle(); } else if (obj->InheritsFrom(TF1::Class())) { - need_frame = !obj->InheritsFrom(TF2::Class()); - if (!has_histo && (strlen(obj->GetTitle()) > 0)) - need_title = obj->GetTitle(); + if (!opt.Contains("SAME")) { + need_frame = !obj->InheritsFrom(TF2::Class()); + if (!has_histo && (strlen(obj->GetTitle()) > 0)) + need_title = obj->GetTitle(); + } } else if (obj->InheritsFrom(TPaveText::Class())) { if (strcmp(obj->GetName(), "title") == 0) title = static_cast(obj);