summaryrefslogtreecommitdiff
path: root/noncore/games/solitaire
Unidiff
Diffstat (limited to 'noncore/games/solitaire') (more/less context) (show whitespace changes)
-rw-r--r--noncore/games/solitaire/canvascard.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/games/solitaire/canvascard.cpp b/noncore/games/solitaire/canvascard.cpp
index cd298ef..3ed9ea0 100644
--- a/noncore/games/solitaire/canvascard.cpp
+++ b/noncore/games/solitaire/canvascard.cpp
@@ -205,25 +205,25 @@ void CanvasCard::draw(QPainter &painter)
205 p->drawPixmap( ix + 4, iy + 4, *cardsChars, 7*(getValue()-1), 0, 7, 7 ); 205 p->drawPixmap( ix + 4, iy + 4, *cardsChars, 7*(getValue()-1), 0, 7, 7 );
206 p->drawPixmap( ix + 12, iy + 4, *cardsSuits, 7*(getSuit()-1), 0, 7, 8 ); 206 p->drawPixmap( ix + 12, iy + 4, *cardsSuits, 7*(getSuit()-1), 0, 7, 8 );
207 p->drawPixmap( ix + w-4-7, iy + h-4-7, *cardsCharsUpsideDown, 7*(12-getValue()+1), 0, 7, 7 ); 207 p->drawPixmap( ix + w-4-7, iy + h-4-7, *cardsCharsUpsideDown, 7*(12-getValue()+1), 0, 7, 7 );
208 p->drawPixmap( ix + w-12-7, iy + h-5-7, *cardsSuitsUpsideDown, 7*(3-getSuit()+1), 0, 7, 8 ); 208 p->drawPixmap( ix + w-12-7, iy + h-5-7, *cardsSuitsUpsideDown, 7*(3-getSuit()+1), 0, 7, 8 );
209 } 209 }
210 210
211 } else { 211 } else {
212 212
213 p->drawPixmap( ix, iy, *cardsBacks ); 213 p->drawPixmap( ix, iy, *cardsBacks );
214 214
215 } 215 }
216 216
217 if (p != &painter) 217 if (p != &painter && unscaledCard)
218 { 218 {
219 p->end(); 219 p->end();
220 QPixmap *scaledCard = CreateScaledPixmap( unscaledCard, scaleX, scaleY ); 220 QPixmap *scaledCard = CreateScaledPixmap( unscaledCard, scaleX, scaleY );
221 int xoff = scaledCard->width() / 2; 221 int xoff = scaledCard->width() / 2;
222 int yoff = scaledCard->height() / 2; 222 int yoff = scaledCard->height() / 2;
223 painter.drawPixmap( (int)x() + xOff - xoff, (int)y() + yOff - yoff, *scaledCard ); 223 painter.drawPixmap( (int)x() + xOff - xoff, (int)y() + yOff - yoff, *scaledCard );
224 delete p; 224 delete p;
225 delete unscaledCard; 225 delete unscaledCard;
226 delete scaledCard; 226 delete scaledCard;
227 } 227 }
228} 228}
229 229