]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Added nested class RedrawDisabler allowing exception-safe disabling of 3d-redraw.
authormtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 19 Jan 2007 16:49:35 +0000 (16:49 +0000)
committermtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 19 Jan 2007 16:49:35 +0000 (16:49 +0000)
EVE/Reve/RGTopFrame.h

index 48b92674278b6facc389650802ea6c56b4f67caf..d341064776e6a255b14bf6633a2ff6e208ed8a3e 100644 (file)
@@ -37,6 +37,17 @@ class RGTopFrame : public TGMainFrame
 public:
   enum LookType_e { LT_Classic, LT_Editor, LT_GLViewer };
 
+  class RedrawDisabler
+  {
+  private:
+    RGTopFrame* fFrame;
+  public:
+    RedrawDisabler(RGTopFrame* f) : fFrame(f)
+    { if (fFrame) fFrame->DisableRedraw(); }
+    ~RedrawDisabler()
+    { if (fFrame) fFrame->EnableRedraw(); }
+  };
+
 private:
   TGCompositeFrame    *fMasterFrame;
   TGTab               *fMasterTab;