Skip to content
Snippets Groups Projects
Commit 7eb9879f authored by Olivier Couet's avatar Olivier Couet
Browse files

- A Square TCanvas saved in batch mode in a root file

  and then displayed again in interactive mode was not
  square anymore.


git-svn-id: http://root.cern.ch/svn/root/trunk@36278 27541ba8-7e3a-0410-8455-c3a389f83636
parent e5c8a444
Branches
Tags
No related merge requests found
...@@ -790,8 +790,14 @@ void TCanvas::Draw(Option_t *) ...@@ -790,8 +790,14 @@ void TCanvas::Draw(Option_t *)
} }
if (old) { gROOT->GetListOfCanvases()->Remove(old); delete old;} if (old) { gROOT->GetListOfCanvases()->Remove(old); delete old;}
if (fWindowWidth == 0) fWindowWidth = 800; if (fWindowWidth == 0) {
if (fWindowHeight == 0) fWindowHeight = 600; if (fCw !=0) fWindowWidth = fCw+4;
else fWindowWidth = 800;
}
if (fWindowHeight == 0) {
if (fCh !=0) fWindowHeight = fCh+28;
else fWindowHeight = 600;
}
fCanvasImp = gGuiFactory->CreateCanvasImp(this, GetName(), fWindowTopX, fWindowTopY, fCanvasImp = gGuiFactory->CreateCanvasImp(this, GetName(), fWindowTopX, fWindowTopY,
fWindowWidth, fWindowHeight); fWindowWidth, fWindowHeight);
fCanvasImp->ShowMenuBar(TestBit(kMenuBar)); fCanvasImp->ShowMenuBar(TestBit(kMenuBar));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment