Skip to content

Commit

Permalink
[webcanv] do not warn when root or xml file should be created
Browse files Browse the repository at this point in the history
If in web mode root or xml file is created do not print warning
  • Loading branch information
linev committed Nov 26, 2024
1 parent 976ba41 commit 8ed53a3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion graf2d/gpad/src/TCanvas.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2710,7 +2710,8 @@ Bool_t TCanvas::SaveAll(const std::vector<TPad *> &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
Expand Down
10 changes: 6 additions & 4 deletions gui/webgui6/src/TWebCanvas.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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())) {
Expand All @@ -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<TPaveText *>(obj);
Expand Down

0 comments on commit 8ed53a3

Please sign in to comment.