X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fselectable.h;h=2d31dbf62bd88a34959da664574f62941de24c58;hb=ec947ff8fd2cf229284f757b8bd6b0f96cbd6383;hp=fdd6f7ff9f1fc298a29e45ae60aab8f4cbede3cc;hpb=209d967b1bb80a9735d690d8f4f0455ecb9970ca;p=ardour.git diff --git a/gtk2_ardour/selectable.h b/gtk2_ardour/selectable.h index fdd6f7ff9f..2d31dbf62b 100644 --- a/gtk2_ardour/selectable.h +++ b/gtk2_ardour/selectable.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2004 Paul Davis + Copyright (C) 2004 Paul Davis This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,13 +15,14 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id$ */ #ifndef __ardour_gtk_selectable_h__ #define __ardour_gtk_selectable_h__ -class Selectable +#include + +class Selectable : public virtual sigc::trackable { public: Selectable() { @@ -30,8 +31,14 @@ class Selectable virtual ~Selectable() {} - virtual void set_selected (bool) { - _selected = true; + virtual void set_selected (bool yn) { + if (yn != _selected) { + _selected = yn; + } + } + + bool get_selected() const { + return _selected; } protected: