Skip to content
Snippets Groups Projects
Commit d1c6deaa authored by Danilo Piparo's avatar Danilo Piparo
Browse files

Add flag to specify that the canvas was drawn

parent e3cec875
Branches
Tags
No related merge requests found
......@@ -84,6 +84,7 @@ protected:
Bool_t fUpdating; //!True when Updating the canvas
Bool_t fRetained; //Retain structure flag
Bool_t fUseGL; //!True when rendering is with GL
Bool_t fDrawn; //!Set to True when drawing
//
TVirtualPadPainter *fPainter; //!Canvas (pad) painter.
......@@ -190,6 +191,7 @@ public:
Bool_t HasMenuBar() const { return TestBit(kMenuBar); }
void Iconify() { fCanvasImp->Iconify(); }
Bool_t IsBatch() const { return fBatch; }
Bool_t IsDrawn() { return fDrawn; }
Bool_t IsFolder() const;
Bool_t IsGrayscale();
Bool_t IsRetained() const { return fRetained; }
......@@ -206,6 +208,7 @@ public:
virtual void Cleared(TVirtualPad *pad); // *SIGNAL*
virtual void Closed(); // *SIGNAL*
void RaiseWindow() { fCanvasImp->RaiseWindow(); }
void ResetDrawn() { fDrawn=kFALSE; }
virtual void Resize(Option_t *option="");
void ResizeOpaque(Int_t set=1);
void SaveSource(const char *filename="", Option_t *option="");
......
......@@ -818,6 +818,8 @@ void TCanvas::Draw(Option_t *)
if (gApplication)
gApplication->InitializeGraphics();
fDrawn = kTRUE;
TCanvas *old = (TCanvas*)gROOT->GetListOfCanvases()->FindObject(GetName());
if (old == this) {
Paint();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment