Changeset 2586 for trunk/MagicSoft/Mars/mhist/MHCamera.cc
- Timestamp:
- 12/01/03 20:03:32 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHCamera.cc
r2566 r2586 355 355 // Setup a drawing canvas. Add this object and all child objects 356 356 // (hexagons, etc) to the current pad. If no pad exists a new one is 357 // created. 357 // created. (To access the 'real' pad containing the camera you have 358 // to do a cd(1) in the current layer. 358 359 // 359 360 // To draw a camera into its own pad do something like: … … 403 404 // 404 405 pad->cd(); 406 } 407 408 // ------------------------------------------------------------------------ 409 // 410 // This is TObject::DrawClone but completely ignores 411 // gROOT->GetSelectedPad(). tbretz had trouble with this in the past. 412 // If this makes trouble please write a bug report. 413 // 414 TObject *MHCamera::DrawClone(Option_t *option) const 415 { 416 // Draw a clone of this object in the current pad 417 418 //TVirtualPad *pad = gROOT->GetSelectedPad(); 419 TVirtualPad *padsav = gPad; 420 //if (pad) pad->cd(); 421 422 TObject *newobj = Clone(); 423 if (!newobj) 424 return 0; 425 426 /* 427 if (pad) { 428 if (strlen(option)) pad->GetListOfPrimitives()->Add(newobj,option); 429 else pad->GetListOfPrimitives()->Add(newobj,GetDrawOption()); 430 pad->Modified(kTRUE); 431 pad->Update(); 432 if (padsav) padsav->cd(); 433 return newobj; 434 } 435 */ 436 437 const TString opt(option); 438 newobj->Draw(opt.IsNull() ? GetDrawOption() : option); 439 440 if (padsav) 441 padsav->cd(); 442 443 return newobj; 405 444 } 406 445
Note:
See TracChangeset
for help on using the changeset viewer.