Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmake/modules/RootConfiguration.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -508,13 +508,13 @@ if(NOT HARDWARE_INTERF_COMPILE OR NOT HARDWARE_INTERF_RUN EQUAL 0)
set(hardwareinterferencesize 64)
endif()

set(root_canvas_class "TRootCanvas")

if(webgui)
set(root_canvas_class "TWebCanvas")
set(root_treeviewer_class "RTreeViewer")
set(root_geompainter_type "web")
set(root_jupyter_jsroot "on")
else()
set(root_canvas_class "TRootCanvas")
set(root_treeviewer_class "TTreeViewer")
set(root_geompainter_type "root")
set(root_jupyter_jsroot "off")
Expand Down
5 changes: 2 additions & 3 deletions core/base/src/TROOT.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2999,7 +2999,6 @@ void TROOT::SetWebDisplay(const char *webdisplay)
const char *wd = webdisplay ? webdisplay : "";

// store default values to set them back when needed
static TString canName = gEnv->GetValue("Canvas.Name", "");
static TString brName = gEnv->GetValue("Browser.Name", "");
static TString trName = gEnv->GetValue("TreeViewer.Name", "");
static TString geomName = gEnv->GetValue("GeomPainter.Name", "");
Expand Down Expand Up @@ -3033,9 +3032,9 @@ void TROOT::SetWebDisplay(const char *webdisplay)
}

if (fIsWebDisplay) {
// restore canvas and browser classes configured at the moment when gROOT->SetWebDisplay() was called for the first time
// restore browser classes configured at the moment when gROOT->SetWebDisplay() was called for the first time
// This is necessary when SetWebDisplay() called several times and therefore current settings may differ
gEnv->SetValue("Canvas.Name", canName);
gEnv->SetValue("Canvas.Name", "TWebCanvas");
gEnv->SetValue("Browser.Name", brName);
gEnv->SetValue("TreeViewer.Name", trName);
gEnv->SetValue("GeomPainter.Name", geomName);
Expand Down
4 changes: 2 additions & 2 deletions gui/gui/src/TRootGuiFactory.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void TRootGuiFactory::ShowWebCanvasWarning()
TCanvasImp *TRootGuiFactory::CreateCanvasImp(TCanvas *c, const char *title,
UInt_t width, UInt_t height)
{
TString canvName = gEnv->GetValue("Canvas.Name", "TWebCanvas");
TString canvName = gEnv->GetValue("Canvas.Name", "TRootCanvas");
if (canvName == "TWebCanvas") {
auto ph = gROOT->GetPluginManager()->FindHandler("TCanvasImp", "TWebCanvas");

Expand All @@ -97,7 +97,7 @@ TCanvasImp *TRootGuiFactory::CreateCanvasImp(TCanvas *c, const char *title,
TCanvasImp *TRootGuiFactory::CreateCanvasImp(TCanvas *c, const char *title,
Int_t x, Int_t y, UInt_t width, UInt_t height)
{
TString canvName = gEnv->GetValue("Canvas.Name", "TWebCanvas");
TString canvName = gEnv->GetValue("Canvas.Name", "TRootCanvas");
if (canvName == "TWebCanvas") {
auto ph = gROOT->GetPluginManager()->FindHandler("TCanvasImp", "TWebCanvas");

Expand Down
Loading