Skip to content

Commit d0a3d7d

Browse files
couetlinev
authored andcommitted
Use the new TPad shortcuts
1 parent 45d08d4 commit d0a3d7d

File tree

11 files changed

+20
-20
lines changed

11 files changed

+20
-20
lines changed

graf3d/eve/src/TEveGeoNode.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ TEveGeoShapeExtract* TEveGeoNode::DumpShapeTree(TEveGeoNode* geon,
337337
{
338338
TEvePad pad;
339339
TEvePadHolder gpad(kFALSE, &pad);
340-
pad.GetListOfPrimitives()->Add(tshape);
340+
pad.Add(tshape);
341341
TGLScenePad scene_pad(&pad);
342342
pad.SetViewer3D(&scene_pad);
343343

graf3d/eve/src/TEveGeoPolyShape.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ TEveGeoPolyShape* TEveGeoPolyShape::Construct(TGeoCompositeShape *cshape, Int_t
5151
TEvePad pad;
5252
TEvePadHolder gpad(kFALSE, &pad);
5353
TGLScenePad scene_pad(&pad);
54-
pad.GetListOfPrimitives()->Add(cshape);
54+
pad.Add(cshape);
5555
pad.SetViewer3D(&scene_pad);
5656

5757
TEveGeoManagerHolder gmgr(TEveGeoShape::GetGeoMangeur(), n_seg);

graf3d/eve/src/TEveScene.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ TEveScene::TEveScene(const char* n, const char* t) :
4747
fHierarchical (kFALSE)
4848
{
4949
fPad = new TEvePad;
50-
fPad->GetListOfPrimitives()->Add(this);
50+
fPad->Add(this);
5151
fGLScene = new TGLScenePad(fPad);
5252
fGLScene->SetName(n);
5353
fGLScene->SetAutoDestruct(kFALSE);
@@ -66,7 +66,7 @@ TEveScene::TEveScene(TGLScenePad* gl_scene, const char* n, const char* t) :
6666
fHierarchical (kFALSE)
6767
{
6868
fPad = new TEvePad;
69-
fPad->GetListOfPrimitives()->Add(this);
69+
fPad->Add(this);
7070
fGLScene->SetPad(fPad);
7171
fGLScene->SetName(n);
7272
fGLScene->SetAutoDestruct(kFALSE);

gui/browsable/src/RNTupleDraw6Provider.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class RNTupleDraw6Provider : public RFieldProvider {
3333
auto h1 = DrawField(dynamic_cast<RFieldHolder*> (obj.get()));
3434
if (!h1) return false;
3535

36-
pad->GetListOfPrimitives()->Add(h1, opt.c_str());
36+
pad->Add(h1, opt.c_str());
3737

3838
return true;
3939
});

hist/hist/src/TGraphTime.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@ void TGraphTime::Paint(Option_t *option)
151151
for (Int_t s=0;s<fNsteps;s++) {
152152
list = (TList*)fSteps->UncheckedAt(s);
153153
if (list) {
154-
gPad->GetListOfPrimitives()->Remove(frame);
154+
gPad->Remove(frame);
155155
gPad->GetListOfPrimitives()->Clear();
156-
if (frame) gPad->GetListOfPrimitives()->Add(frame);
156+
if (frame) gPad->Add(frame);
157157
lnk = list->FirstLink();
158158
while(lnk) {
159159
TObject *obj = lnk->GetObject();
@@ -180,9 +180,9 @@ void TGraphTime::SaveAnimatedGif(const char *filename) const
180180
for (Int_t s=0;s<fNsteps;s++) {
181181
list = (TList*)fSteps->UncheckedAt(s);
182182
if (list) {
183-
gPad->GetListOfPrimitives()->Remove(frame);
183+
gPad->Remove(frame);
184184
gPad->GetListOfPrimitives()->Clear();
185-
if (frame) gPad->GetListOfPrimitives()->Add(frame);
185+
if (frame) gPad->Add(frame);
186186
lnk = list->FirstLink();
187187
while(lnk) {
188188
TObject *obj = lnk->GetObject();

hist/hist/src/TH1.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3090,7 +3090,7 @@ void TH1::Draw(Option_t *option)
30903090
} else {
30913091
//the following statement is necessary in case one attempts to draw
30923092
//a temporary histogram already in the current pad
3093-
if (TestBit(kCanDelete)) gPad->GetListOfPrimitives()->Remove(this);
3093+
if (TestBit(kCanDelete)) gPad->Remove(this);
30943094
gPad->Clear();
30953095
}
30963096
gPad->IncrementPaletteColor(1, opt1);

hist/hist/src/THStack.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ void THStack::Draw(Option_t *option)
459459
if (!opt.Contains("same")) {
460460
//the following statement is necessary in case one attempts to draw
461461
//a temporary histogram already in the current pad
462-
if (TestBit(kCanDelete)) gPad->GetListOfPrimitives()->Remove(this);
462+
if (TestBit(kCanDelete)) gPad->Remove(this);
463463
gPad->Clear();
464464
}
465465
}

hist/histpainter/src/THistPainter.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6785,7 +6785,7 @@ void THistPainter::PaintFrame()
67856785
if (Hoption.Lego || Hoption.Surf || Hoption.Tri ||
67866786
Hoption.Contour == 14 || Hoption.Error >= 100) {
67876787
TObject *frame = gPad->FindObject("TFrame");
6788-
if (frame) gPad->GetListOfPrimitives()->Remove(frame);
6788+
if (frame) gPad->Remove(frame);
67896789
return;
67906790
}
67916791

test/Tetris.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ TetrisBox::TetrisBox(Int_t x, Int_t y, UInt_t type, TPad* pad) :
4545
//------- append box to pad
4646
SetBit(kMustCleanup);
4747
SetBit(kCanDelete);
48-
pad->GetListOfPrimitives()->Add(this);
48+
pad->Add(this);
4949
SetXY(x,y);
5050
}
5151

@@ -795,10 +795,10 @@ InfoPad::InfoPad(const char* title, Float_t xlow, Float_t ylow, Float_t xup, Flo
795795
TText *text = new TText(xlow,yup,title); // draw title of the information pad
796796
text->SetTextSize(0.45*(yup-ylow));
797797
text->SetY(yup+0.2*text->GetTextSize());
798-
fMother->GetListOfPrimitives()->Add(text);
798+
fMother->Add(text);
799799

800800
text = new TText(0.5,0.5,"0"); // this text used to display fValue
801-
GetListOfPrimitives()->Add(text);
801+
Add(text);
802802

803803
fValue = 0;
804804
Modified(kTRUE);
@@ -910,7 +910,7 @@ UpdateLevelTimer::UpdateLevelTimer(ULong_t time) : TTimer(time,kTRUE)
910910
// Update level timer constructor
911911

912912
SetBit(kCanDelete); // delete this when gTetris is deleted
913-
gTetris->GetListOfPrimitives()->Add(this);
913+
gTetris->Add(this);
914914
}
915915

916916
Bool_t UpdateLevelTimer::Notify()

tree/treeplayer/src/TTreePerfStats.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ void TTreePerfStats::Draw(Option_t *option)
258258
if (!gPad->IsEditable()) gROOT->MakeDefCanvas();
259259
//the following statement is necessary in case one attempts to draw
260260
//a temporary histogram already in the current pad
261-
if (TestBit(kCanDelete)) gPad->GetListOfPrimitives()->Remove(this);
261+
if (TestBit(kCanDelete)) gPad->Remove(this);
262262
} else {
263263
gROOT->MakeDefCanvas();
264264
}

0 commit comments

Comments
 (0)