author | tille <tille> | 2002-06-26 10:41:53 (UTC) |
---|---|---|
committer | tille <tille> | 2002-06-26 10:41:53 (UTC) |
commit | b72d90431bf1bf3235213612daad275836bcbb9f (patch) (unidiff) | |
tree | a6904f310e09d2d96f2dae6d84b6e76339aaf599 | |
parent | 28d91fba01e6eb728de997757a33f4328ee19e2f (diff) | |
download | opie-b72d90431bf1bf3235213612daad275836bcbb9f.zip opie-b72d90431bf1bf3235213612daad275836bcbb9f.tar.gz opie-b72d90431bf1bf3235213612daad275836bcbb9f.tar.bz2 |
bugreport #75 and fix from cmader
-rw-r--r-- | noncore/games/solitaire/patiencecardgame.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/noncore/games/solitaire/patiencecardgame.cpp b/noncore/games/solitaire/patiencecardgame.cpp index 1501d2f..fc91b26 100644 --- a/noncore/games/solitaire/patiencecardgame.cpp +++ b/noncore/games/solitaire/patiencecardgame.cpp | |||
@@ -181,32 +181,35 @@ bool PatienceCardGame::mousePressCard( Card *card, QPoint p ) | |||
181 | CanvasCard *item = (CanvasCard *)card; | 181 | CanvasCard *item = (CanvasCard *)card; |
182 | if (item->isFacing() != TRUE) { | 182 | if (item->isFacing() != TRUE) { |
183 | // From facedown stack | 183 | // From facedown stack |
184 | if ((item->x() == 5) && ((int)item->y() == 10)) { | 184 | if ((item->x() == 5) && ((int)item->y() == 10)) { |
185 | item->setZ(highestZ); | 185 | item->setZ(highestZ); |
186 | highestZ++; | 186 | highestZ++; |
187 | 187 | ||
188 | // Added Code | 188 | // Added Code |
189 | faceDownDealingPile->removeCard(item); | 189 | faceDownDealingPile->removeCard(item); |
190 | faceUpDealingPile->addCardToTop(item); | 190 | faceUpDealingPile->addCardToTop(item); |
191 | item->setCardPile( faceUpDealingPile ); | 191 | item->setCardPile( faceUpDealingPile ); |
192 | 192 | ||
193 | if ( qt_screen->deviceWidth() < 200 ) | 193 | if ( qt_screen->deviceWidth() < 200 ) |
194 | item->flipTo( 30, (int)item->y() ); | 194 | item->flipTo( 30, (int)item->y() ); |
195 | else | 195 | else |
196 | item->flipTo( 35, (int)item->y() ); | 196 | item->flipTo( 35, (int)item->y() ); |
197 | } else { | ||
198 | // fix from cmader by tille | ||
199 | return false; | ||
197 | } | 200 | } |
198 | moving = NULL; | 201 | moving = NULL; |
199 | moved = FALSE; | 202 | moved = FALSE; |
200 | 203 | ||
201 | // move two other cards if we flip three at a time | 204 | // move two other cards if we flip three at a time |
202 | int flipped = 1; | 205 | int flipped = 1; |
203 | QCanvasItemList l = canvas()->collisions( p ); | 206 | QCanvasItemList l = canvas()->collisions( p ); |
204 | for (QCanvasItemList::Iterator it = l.begin(); (it != l.end()) && (flipped != cardsDrawn()); ++it) { | 207 | for (QCanvasItemList::Iterator it = l.begin(); (it != l.end()) && (flipped != cardsDrawn()); ++it) { |
205 | if ( (*it)->rtti() == canvasCardId ) { | 208 | if ( (*it)->rtti() == canvasCardId ) { |
206 | CanvasCard *item = (CanvasCard *)*it; | 209 | CanvasCard *item = (CanvasCard *)*it; |
207 | if (item->animated()) | 210 | if (item->animated()) |
208 | continue; | 211 | continue; |
209 | item->setZ(highestZ); | 212 | item->setZ(highestZ); |
210 | highestZ++; | 213 | highestZ++; |
211 | flipped++; | 214 | flipped++; |
212 | 215 | ||