Changeset 5620 for trunk/MagicSoft/Mars/mbase
- Timestamp:
- 12/17/04 13:27:08 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc
r5557 r5620 1588 1588 // Draws a clone of a canvas into a new canvas. Taken from TCanvas. 1589 1589 // 1590 void MStatusDisplay::DrawClonePad(TCanvas &newc, constTCanvas &oldc) const1590 void MStatusDisplay::DrawClonePad(TCanvas &newc, TCanvas &oldc) const 1591 1591 { 1592 1592 //copy pad attributes … … 1605 1605 ((TAttPad&)oldc).Copy((TAttPad&)newc); 1606 1606 1607 // This must be there: Otherwise GetDrawOption() won't work 1608 TVirtualPad *padsav = gPad; 1609 oldc.cd(); 1610 1607 1611 //copy primitives 1608 1612 TObject *obj; 1609 1613 TIter next(oldc.GetListOfPrimitives()); 1610 while ((obj=next())) { 1611 gROOT->SetSelectedPad(&newc); 1612 newc.GetListOfPrimitives()->Add(obj->Clone(),obj->GetDrawOption()); 1614 while ((obj=next())) 1615 { 1616 // Old line - I think it is not necessary anymore because of the cd() 1617 //gROOT->SetSelectedPad(&newc); 1618 1619 // Now make a clone of the object 1620 TObject *clone = obj->Clone(); 1621 1622 // Clone also important bits (FIXME: Is this correct) 1623 clone->SetBit(obj->TestBits(kMustCleanup|kCannotPick|kNoContextMenu)); 1624 1625 // Now make sure that the clones are deleted at a later time 1626 clone->SetBit(kCanDelete); 1627 1628 // Add the clone and its draw-option to the current pad 1629 newc.GetListOfPrimitives()->Add(clone, obj->GetDrawOption()); 1613 1630 } 1614 1631 newc.Modified(); 1615 1632 newc.Update(); 1633 1634 padsav->cd(); 1616 1635 } 1617 1636 -
trunk/MagicSoft/Mars/mbase/MStatusDisplay.h
r5498 r5620 117 117 void UpdateTab(TGCompositeFrame *f); 118 118 119 void DrawClonePad(TCanvas &newc, constTCanvas &oldc) const;119 void DrawClonePad(TCanvas &newc, TCanvas &oldc) const; 120 120 void CanvasSetFillColor(TPad &c, Int_t col) const; 121 121 Bool_t Display(const TObjArray &list);
Note:
See TracChangeset
for help on using the changeset viewer.