Difference between gPad and gROOT->GetSelectedPad()?

Hi all,

I had a loot into the DrawClone() method and there is the following piece of code :

TVirtualPad *pad = gROOT->GetSelectedPad(); TVirtualPad *padsav = gPad;
What is the difference between pad and padsav ?
I thought that gPad contained a reference to the selected pad.

By the way, but it might be connected with my previous question, why DrawClone() is not simply implemented as a call to Clone() and then Draw() ?

Thanks

Barth

gPad is not the Selected pad. gPad is the current pad in which all the painting is currently done. The selected pad is the highlighted one (when you click with the right mouse button in a pad)