flagrowobj.cpp
changeset 231 1fe2373efbc3
parent 166 325958acb69b
child 236 22a885118d50
     1.1 --- a/flagrowobj.cpp	Mon Oct 10 11:20:25 2005 +0000
     1.2 +++ b/flagrowobj.cpp	Tue Mar 07 11:32:02 2006 +0000
     1.3 @@ -86,8 +86,8 @@
     1.4  
     1.5  void FlagRowObj::positionBBox()
     1.6  {
     1.7 -    bbox.setX (absPos.x() );
     1.8 -    bbox.setY (absPos.y() );
     1.9 +    bbox.moveTopLeft(absPos );
    1.10 +    clickBox.moveTopLeft(absPos );
    1.11  }
    1.12  
    1.13  void FlagRowObj::calcBBoxSize()
    1.14 @@ -104,15 +104,19 @@
    1.15  		if (size.height() > boxsize.height() ) 
    1.16  			boxsize.setHeight(size.height() );
    1.17  	}
    1.18 -	bbox.setSize (QSize(boxsize.width(), boxsize.height() ));
    1.19 +	bbox.setSize (boxsize);
    1.20 +	clickBox.setSize (boxsize);
    1.21  }
    1.22  
    1.23  QString FlagRowObj::getFlagName (const QPoint &p)
    1.24  {
    1.25 -	if (!inBBox (p)) return "";
    1.26 +	if (!inBox (p)) return "";
    1.27  	FlagObj *fo;
    1.28  	for (fo=flag.first();fo; fo=flag.next() )
    1.29 -		if (fo->inBBox (p)) return fo->getName();
    1.30 +	{	
    1.31 +		cout << " "<<fo->getName()<<endl;
    1.32 +		if (fo->inBox (p)) return fo->getName();
    1.33 +	}	
    1.34  	return "";	
    1.35  
    1.36  	
    1.37 @@ -178,7 +182,6 @@
    1.38  				fo->activate();
    1.39  				fo->setVisibility (visible);
    1.40  				calcBBoxSize();
    1.41 -				positionBBox();
    1.42  			} else
    1.43  				qWarning ("FlagRowObj ("+name+")::activate ("+foname+")  failed - could not find it in parentRow");
    1.44  		}