Skip to content
Snippets Groups Projects
Commit 865191ad authored by Sergey Linev's avatar Sergey Linev
Browse files

Gui factory tries to create web browser if web display is configured

parent d50c8237
No related branches found
No related tags found
No related merge requests found
......@@ -73,9 +73,8 @@ TCanvasImp *TGuiFactory::CreateCanvasImp(TCanvas *c, const char *title, Int_t x,
TBrowserImp *TGuiFactory::CreateBrowserImp(TBrowser *b, const char *title, UInt_t width, UInt_t height, Option_t *opt)
{
TString webclass = "ROOT::Experimental::RWebBrowserImp";
if ((gROOT->GetWebDisplay() == "server") && (webclass == gEnv->GetValue("Browser.Name", "---"))) {
TPluginHandler *ph = gROOT->GetPluginManager()->FindHandler("TBrowserImp", webclass);
if (gROOT->IsWebDisplay()) {
auto ph = gROOT->GetPluginManager()->FindHandler("TBrowserImp", "ROOT::Experimental::RWebBrowserImp");
if (ph && ph->LoadPlugin() != -1) {
TBrowserImp *imp = (TBrowserImp *)ph->ExecPlugin(5, b, title, width, height, opt);
......@@ -91,9 +90,8 @@ TBrowserImp *TGuiFactory::CreateBrowserImp(TBrowser *b, const char *title, UInt_
TBrowserImp *TGuiFactory::CreateBrowserImp(TBrowser *b, const char *title, Int_t x, Int_t y, UInt_t width, UInt_t height, Option_t *opt)
{
TString webclass = "ROOT::Experimental::RWebBrowserImp";
if ((gROOT->GetWebDisplay() == "server") && (webclass == gEnv->GetValue("Browser.Name", "---"))) {
TPluginHandler *ph = gROOT->GetPluginManager()->FindHandler("TBrowserImp", webclass);
if (gROOT->IsWebDisplay()) {
auto ph = gROOT->GetPluginManager()->FindHandler("TBrowserImp", "ROOT::Experimental::RWebBrowserImp");
if (ph && ph->LoadPlugin() != -1) {
TBrowserImp *imp = (TBrowserImp *)ph->ExecPlugin(7, b, title, x, y, width, height, opt);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment