[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kalziumkde4: kdeedu/kalzium/src
From: Carsten Niehaus <cniehaus () gmx ! de>
Date: 2005-01-30 15:25:24
Message-ID: 20050130152524.A6D121CF38 () office ! kde ! org
[Download RAW message or body]
CVS commit by cniehaus:
jason please test
M +14 -6 pse.cpp 1.18.4.17
--- kdeedu/kalzium/src/pse.cpp #1.18.4.16:1.18.4.17
@@ -254,17 +254,25 @@ void PSE::mouseReleaseEvent( QMouseEvent
CList::Iterator it = d->CoordinateList.begin();
- while ( it != d->CoordinateList.end() )
+
+ bool notFound = true;
+
+ int counter = 1;
+ while ( it != d->CoordinateList.end() && notFound == true )
{//iterate through the list of coordinates and compare the x/y values.
//finally, if the 20'es iterator has the same cooridnates Element 20
//has been clicked.
- if ( (*it ).x == X )
+
+ coordinate c = *it;
+ if ( c.x == X )
{
- if ( (*it ).y == Y )
+ if ( c.y == Y )
{//coordinates match. Get the position of the it in the \
list.
- coordinate c = *it;
- kdDebug() << c.x << " " << c.y << endl;
-// kdDebug() << "Element: " << \
d->CoordinateList.findIndex( c ) << endl; + kdDebug() \
<< "Count: " << counter << " --- x: " << c.x << " y: " << c.y << endl; +
+ notFound = false;
}
}
+ ++it;
+ ++counter;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic