Changeset 2410 for trunk/MagicSoft/Mars/mbase
- Timestamp:
- 10/20/03 17:49:59 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MParContainer.cc
r2219 r2410 114 114 TObject *MParContainer::Clone(const char *newname) const 115 115 { 116 117 116 MParContainer *named = (MParContainer*)TObject::Clone(); 118 117 if (newname && strlen(newname)) named->SetName(newname); … … 584 583 return ((TEnv&)env).GetValue(prefix, dflt); 585 584 } 585 586 void MParContainer::DrawTS(TObject *obj, TVirtualPad *pad, Option_t *option) 587 { 588 if (!obj) 589 { 590 gLog << warn << "MParContainer::DrawTS: obj==NULL" << endl; 591 return; 592 } 593 594 if (!pad) 595 pad = gPad; 596 597 // FIXME: Move MH to mbase 598 //if (!pad) 599 // pad = MakeDefCanvas(this); 600 601 if (!pad) 602 { 603 if (!gROOT->GetMakeDefCanvas()) 604 return; 605 (gROOT->GetMakeDefCanvas())(); 606 pad = gPad; 607 } 608 609 if (!pad->IsEditable()) 610 return; 611 612 obj->SetBit(kMustCleanup); 613 614 pad->GetListOfPrimitives()->Add(obj, option); 615 pad->Modified(kTRUE); 616 } 617 618 TObject *MParContainer::DrawCloneTS(const TObject *obj, TVirtualPad *pad, Option_t *option) 619 { 620 // Draw a clone of this object in the current pad 621 if (!obj) 622 return 0; 623 624 TObject *newobj = obj->Clone(); 625 if (!newobj) 626 return 0; 627 628 /* 629 gLog << dbg << "MParConatiner::DrawCloneTS - "; 630 gLog << (int)newobj->InheritsFrom(MParContainer::Class()) << " "; 631 gLog << pad << endl; 632 */ 633 if (newobj->InheritsFrom(MParContainer::Class())) 634 ((MParContainer*)newobj)->DrawTS(pad, strlen(option) ? option : obj->GetDrawOption()); 635 else 636 DrawTS(newobj, pad, strlen(option) ? option : obj->GetDrawOption()); 637 638 return newobj; 639 }
Note:
See TracChangeset
for help on using the changeset viewer.