GUI/Gadget.cs
changeset 202 551243a66b32
parent 183 3096735e99b2
child 244 99f16e21cdc8
     1.1 --- a/GUI/Gadget.cs	Thu Sep 30 16:51:09 2010 +0000
     1.2 +++ b/GUI/Gadget.cs	Thu Sep 30 20:59:21 2010 +0000
     1.3 @@ -1,4 +1,4 @@
     1.4 -/*
     1.5 +/*
     1.6    
     1.7    Version: MPL 1.1/GPL 2.0/LGPL 2.1
     1.8  
     1.9 @@ -166,14 +166,17 @@
    1.10        }
    1.11        set {
    1.12          if (value != window.Visible) {
    1.13 +          window.Visible = value;
    1.14            if (value)
    1.15 -            Redraw();
    1.16 -          window.Visible = value;
    1.17 +            Redraw();          
    1.18          }
    1.19        }
    1.20      }
    1.21  
    1.22      public void Redraw() {
    1.23 +      if (!window.Visible)
    1.24 +        return;
    1.25 +      
    1.26        if (window.Size != buffer.Size) {
    1.27          DisposeBuffer();
    1.28          CreateBuffer();