# HG changeset patch
# User insilmaril
# Date 1186684447 0
# Node ID 8099ebaf4515bafa6ebe1cf6f510e6531bad64eb
# Parent  1c487b3dd40f46ee4fbedf34693418b804a96f20
1.10.0

diff -r 1c487b3dd40f -r 8099ebaf4515 flagobj.cpp
--- a/flagobj.cpp	Fri Aug 03 14:13:35 2007 +0000
+++ b/flagobj.cpp	Thu Aug 09 18:34:07 2007 +0000
@@ -30,11 +30,13 @@
 void FlagObj::init ()
 {
 	name="undefined";
-	group="undefined";
+	unsetGroup();
 
 	icon=new ImageObj (scene);
 	icon->setPos (absPos.x(), absPos.y() );
 	state=false;
+	used=false;
+	avis=true;
 	action=NULL;
 }
 
@@ -45,6 +47,8 @@
 	group=other->group;
 	tooltip=other->tooltip;
 	state=other->state;
+	avis=other->avis;
+	used=other->used;
 	icon->copy(other->icon);
 	action=other->action;
 	setVisibility (other->isVisibleObj() );
@@ -105,6 +109,11 @@
 	return group;
 }
 
+void FlagObj::unsetGroup()
+{
+	group="undefined";
+}
+
 void FlagObj::setToolTip(const QString &n)
 {
 	tooltip=n;
@@ -127,7 +136,22 @@
 
 void FlagObj::updateAction ()
 {
-	if (action) action->setChecked(state);
+	if (action) 
+	{
+		action->setChecked(state);
+		if (!avis)
+			action->setVisible(state);
+	}
+}
+
+void FlagObj::setAlwaysVisible(bool b)
+{
+	avis=b;
+}
+
+bool FlagObj::isAlwaysVisible()
+{
+	return avis;
 }
 
 bool FlagObj::isActive()