]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/Reve/RGEditor.cxx
Add Getters and Setters in TrackRnrStyle and TrackList to define rendering of path...
[u/mrichter/AliRoot.git] / EVE / Reve / RGEditor.cxx
index ef99305fa264a94775f6ab8a21378ac8d8b65ce5..cc98a3e2ec24e6a75c4bd8dfc8fca1912ebaef4d 100644 (file)
@@ -1,6 +1,8 @@
 // $Header$
 
 #include "RGEditor.h"
+#include "RenderElement.h"
+#include "RGTopFrame.h"
 
 #include <TGedFrame.h>
 #include <TGCanvas.h>
@@ -14,20 +16,31 @@ using namespace Reve;
 
 ClassImp(RGEditor)
 
-RGEditor::RGEditor(TCanvas* canvas) : TGedEditor(canvas)
+RGEditor::RGEditor(TCanvas* canvas) :
+  TGedEditor(canvas),
+  fRnrElement(0)
 {}
 
+void RGEditor::DisplayRenderElement(RenderElement* re)
+{
+  fRnrElement = re;
+  TObject* obj = fRnrElement ? fRnrElement->GetObject() : 0;
+  SetModel(fPad, obj, kButton1Down);
+}
+
 void RGEditor::DisplayObject(TObject* obj)
 {
+  fRnrElement = 0;
   SetModel(fPad, obj, kButton1Down);
 }
 
 void RGEditor::Update(TGedFrame* /*gframe*/)
 {
-  // Copy from TGeEditor ... need to do something better now.
-  if (fPad) {
-      fPad->Modified();
-      fPad->Update();
-   }
+  // Virtual method from TGedEditor ... called on every change.
+
+  if (fRnrElement) {
+    fRnrElement->UpdateItems();
+  }
 
+  gReve->Redraw3D();
 }