Changeset 19328


Ignore:
Timestamp:
Oct 29, 2018, 10:58:54 PM (8 months ago)
Author:
tbretz
Message:
It seems something is deleting the canvases (could not find what), so this works around.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mbase/MStatusDisplay.cc

    r19317 r19328  
    11331133    TGCompositeFrame *f = fTab->AddTab(name);
    11341134
     1135    struct MRootEmbeddedCanvas : public TRootEmbeddedCanvas
     1136    {
     1137        MRootEmbeddedCanvas(const char *n, TGWindow *p, UInt_t w, UInt_t h, UInt_t m) :
     1138            TRootEmbeddedCanvas(n, p, w, h, m)
     1139        {
     1140            fCanvas->SetBit(kMustCleanup);
     1141        }
     1142        void RecursiveRemove(TObject *obj)
     1143        {
     1144            if (obj==fCanvas)
     1145                fCanvas = 0;
     1146        }
     1147    };
     1148
     1149
    11351150    // create root embedded canvas and add it to the tab
    1136     TRootEmbeddedCanvas *ec = new TRootEmbeddedCanvas(name, f, f->GetWidth(), f->GetHeight(), kSunkenFrame);
     1151    TRootEmbeddedCanvas *ec = new MRootEmbeddedCanvas(name, f, f->GetWidth(), f->GetHeight(), kSunkenFrame);
    11371152    f->AddFrame(ec, fLayCanvas);
    11381153    fList->Add(ec);
Note: See TracChangeset for help on using the changeset viewer.