flagrowobj.cpp
changeset 357 64819498efbf
parent 256 ba81afcb2b51
child 366 e95081c21da2
     1.1 --- a/flagrowobj.cpp	Thu Mar 23 12:38:54 2006 +0000
     1.2 +++ b/flagrowobj.cpp	Thu Jul 13 08:40:58 2006 +0000
     1.3 @@ -161,6 +161,8 @@
     1.4  
     1.5  void FlagRowObj::activate (const QString &foname)
     1.6  {
     1.7 +	// Note: "activate" is also called during loading of a map
     1.8 +	// Here we do not check for exclusive flags!
     1.9  	FlagObj *fo=findFlag (foname);
    1.10  	if (parentRow)
    1.11  	{
    1.12 @@ -219,10 +221,14 @@
    1.13  	// deactivate all flags in keepof, but keep keepfo [sic!]
    1.14  	if (keepfo)
    1.15  	{
    1.16 -		FlagObj *fo;
    1.17 -		for (fo=flag.first();fo; fo=flag.next() )
    1.18 -			if (keepfo->getGroup()==fo->getGroup() && keepfo!=fo) 
    1.19 -				flag.remove(fo);
    1.20 +		QString g=keepfo->getGroup();
    1.21 +		if (g!="undefined")
    1.22 +		{
    1.23 +			FlagObj *fo;
    1.24 +			for (fo=flag.first();fo; fo=flag.next() )
    1.25 +				if (g==fo->getGroup() && keepfo!=fo) 
    1.26 +					flag.remove(fo);
    1.27 +		}		
    1.28  	}	
    1.29  }
    1.30