Ignore:
Timestamp:
07/29/03 13:18:57 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhist/MH.cc

    r2209 r2296  
    796796// Otherwise the present gPad is returned.
    797797//
    798 TVirtualPad *MH::GetNewPad(Option_t *opt)
    799 {
    800     TString str(opt);
    801 
    802     if (!str.Contains("nonew", TString::kIgnoreCase))
     798TVirtualPad *MH::GetNewPad(TString &opt)
     799{
     800    opt.ToLower();
     801
     802    if (!opt.Contains("nonew"))
    803803        return NULL;
     804
     805    opt.ReplaceAll("nonew", "");
    804806
    805807    return gPad;
     
    813815TObject *MH::Clone(const char *name) const
    814816{
    815     Bool_t store = TH1::AddDirectoryStatus();
     817    const Bool_t store = TH1::AddDirectoryStatus();
     818
    816819    TH1::AddDirectory(kFALSE);
    817 
    818820    TObject *o = MParContainer::Clone(name);
    819 
    820821    TH1::AddDirectory(store);
    821822
     
    831832TObject *MH::DrawClone(Option_t *opt, Int_t w, Int_t h) const
    832833{
    833     TVirtualPad *p = GetNewPad(opt);
     834    TString option(opt);
     835
     836    TVirtualPad *p = GetNewPad(option);
    834837    if (!p)
    835838        p = MakeDefCanvas(this, w, h);
     
    839842    gROOT->SetSelectedPad(NULL);
    840843
    841     TObject *o = MParContainer::DrawClone(opt);
     844    TObject *o = MParContainer::DrawClone(option);
    842845    o->SetBit(kCanDelete);
    843846    return o;
Note: See TracChangeset for help on using the changeset viewer.