summaryrefslogtreecommitdiff
authortille <tille>2002-06-26 10:41:53 (UTC)
committer tille <tille>2002-06-26 10:41:53 (UTC)
commitb72d90431bf1bf3235213612daad275836bcbb9f (patch) (side-by-side diff)
treea6904f310e09d2d96f2dae6d84b6e76339aaf599
parent28d91fba01e6eb728de997757a33f4328ee19e2f (diff)
downloadopie-b72d90431bf1bf3235213612daad275836bcbb9f.zip
opie-b72d90431bf1bf3235213612daad275836bcbb9f.tar.gz
opie-b72d90431bf1bf3235213612daad275836bcbb9f.tar.bz2
bugreport #75 and fix from cmader
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/solitaire/patiencecardgame.cpp3
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
@@ -173,48 +173,51 @@ void PatienceCardGame::writeConfig( Config& cfg )
faceUpDealingPile->writeConfig( cfg, "FaceUpDealingPile" );
}
bool PatienceCardGame::mousePressCard( Card *card, QPoint p )
{
Q_UNUSED(p);
CanvasCard *item = (CanvasCard *)card;
if (item->isFacing() != TRUE) {
// From facedown stack
if ((item->x() == 5) && ((int)item->y() == 10)) {
item->setZ(highestZ);
highestZ++;
// Added Code
faceDownDealingPile->removeCard(item);
faceUpDealingPile->addCardToTop(item);
item->setCardPile( faceUpDealingPile );
if ( qt_screen->deviceWidth() < 200 )
item->flipTo( 30, (int)item->y() );
else
item->flipTo( 35, (int)item->y() );
+ } else {
+ // fix from cmader by tille
+ return false;
}
moving = NULL;
moved = FALSE;
// move two other cards if we flip three at a time
int flipped = 1;
QCanvasItemList l = canvas()->collisions( p );
for (QCanvasItemList::Iterator it = l.begin(); (it != l.end()) && (flipped != cardsDrawn()); ++it) {
if ( (*it)->rtti() == canvasCardId ) {
CanvasCard *item = (CanvasCard *)*it;
if (item->animated())
continue;
item->setZ(highestZ);
highestZ++;
flipped++;
// Added Code
faceDownDealingPile->removeCard(item);
faceUpDealingPile->addCardToTop(item);
item->setCardPile( faceUpDealingPile );
if ( qt_screen->deviceWidth() < 200 )
item->flipTo( 30, (int)item->y(), 8 * flipped );
else