X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=EVE%2FReve%2FTrackEditors.cxx;h=2bab8e469a3ae0299bf3621def9cf16ed8529433;hb=a8600b566c7eec7b922865dad7bb85c615b6d349;hp=95cfa64b7059bd2562a036631da08bea39af3968;hpb=2cea06006d90b2abbf9f64db1b4b3e487a6f3b34;p=u%2Fmrichter%2FAliRoot.git diff --git a/EVE/Reve/TrackEditors.cxx b/EVE/Reve/TrackEditors.cxx index 95cfa64b705..2bab8e469a3 100644 --- a/EVE/Reve/TrackEditors.cxx +++ b/EVE/Reve/TrackEditors.cxx @@ -22,10 +22,10 @@ using namespace Reve; ClassImp(TrackListEditor) -TrackListEditor::TrackListEditor(const TGWindow *p, Int_t id, +TrackListEditor::TrackListEditor(const TGWindow *p, Int_t width, Int_t height, UInt_t options, Pixel_t back) : - TGedFrame(p, id, width, height, options | kVerticalFrame, back), + TGedFrame(p, width, height, options | kVerticalFrame, back), fTC (0), @@ -151,13 +151,6 @@ TrackListEditor::TrackListEditor(const TGWindow *p, Int_t id, fPtRange->Connect("ValueSet()", "Reve::TrackListEditor", this, "DoPtRange()"); AddFrame(fPtRange, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1)); - - // Register the editor. - TClass *cl = TrackList::Class(); - TGedElement *ge = new TGedElement; - ge->fGedFrame = this; - ge->fCanvas = 0; - cl->GetEditorList()->Add(ge); } TrackListEditor::~TrackListEditor() @@ -165,20 +158,9 @@ TrackListEditor::~TrackListEditor() /**************************************************************************/ -void TrackListEditor::SetModel(TVirtualPad* pad, TObject* obj, Int_t ) +void TrackListEditor::SetModel(TObject* obj) { - fModel = 0; - fPad = 0; - - if (!obj || !obj->InheritsFrom(TrackList::Class()) || obj->InheritsFrom(TVirtualPad::Class())) { - SetActive(kFALSE); - return; - } - - fModel = obj; - fPad = pad; - - fTC = dynamic_cast(fModel); + fTC = dynamic_cast(obj); fMaxR->SetNumber(fTC->GetMaxR()); fMaxZ->SetNumber(fTC->GetMaxZ()); @@ -193,8 +175,6 @@ void TrackListEditor::SetModel(TVirtualPad* pad, TObject* obj, Int_t ) fFitDecay->SetState(fTC->GetFitDecay() ? kButtonDown : kButtonUp); fPtRange->SetValues(0.1, 10); - - SetActive(); } /**************************************************************************/ @@ -263,4 +243,5 @@ void TrackListEditor::DoFitDecay() void TrackListEditor::DoPtRange() { fTC->SelectByPt(fPtRange->GetMin(), fPtRange->GetMax()); + Update(); }