]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/indicator.cpp
Fix a crash if the linear program contains an empty column
[libs/gltk.git] / source / indicator.cpp
index 86c25247e28eee4d08e6e41938f58526317ee74c..568aafddc9af7feb3d4e054bcc90c2a0a2a03125 100644 (file)
@@ -1,24 +1,19 @@
-/* $Id$
-
-This file is part of libmspgltk
-Copyright © 2007  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #include "indicator.h"
 
 namespace Msp {
 namespace GLtk {
 
-Indicator::Indicator(const Resources &r):
-       Widget(r)
+Indicator::Indicator()
 {
-       update_style();
+       focusable = false;
 }
 
 void Indicator::set_active(bool a)
 {
-       state=(a ? ACTIVE : NORMAL);
+       if(a)
+               state |= ACTIVE;
+       else
+               state &= ~ACTIVE;
 }
 
 } // namespace GLtk