Changeset 8678
- Timestamp:
- 08/19/07 13:47:40 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc
r8677 r8678 702 702 fBatch = new TList; 703 703 fBatch->SetOwner(); 704 fBatch->SetBit(kMustCleanup);705 gROOT->GetListOfCleanups()->Add(fBatch);706 704 707 705 // … … 1026 1024 const UInt_t ch = 2*cw/3 + 25; // 25: Menu, etc 1027 1025 1028 TCanvas *c = new TCanvas(name, name, -cw, ch); 1026 // The constructor of TCanvas adds the canvas to th eglobal list 1027 // of canvases gROOT->GetListOfCanvases(). If a canvas with an 1028 // identical name exists already in this list, the canvas is 1029 // deleted. In normal operation this might make sense and doesn't harm 1030 // because the embedded canvases behave different. 1031 // By creating the canvas without a name it is made sure that no 1032 // older canvas/tab vanished silently from the system (deleted from 1033 // the construtor). To make the handling of our canvases nevertheless 1034 // work well the name is set later. The list of canvases is also 1035 // part of the list of cleanups, thus fBatch need not to be added 1036 // to the list of cleanups. 1037 TCanvas *c = new TCanvas("", name, -cw, ch); 1038 c->SetName(name); 1029 1039 fBatch->Add(c); 1030 1040 return *c;
Note:
See TracChangeset
for help on using the changeset viewer.