-rw-r--r-- | noncore/games/solitaire/canvascard.cpp | 2 | ||||
-rw-r--r-- | noncore/games/tetrix/ohighscoredlg.cpp | 9 |
2 files changed, 2 insertions, 9 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 | |||
@@ -211,13 +211,13 @@ void CanvasCard::draw(QPainter &painter) | |||
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 ); |
diff --git a/noncore/games/tetrix/ohighscoredlg.cpp b/noncore/games/tetrix/ohighscoredlg.cpp index 66f4917..504385f 100644 --- a/noncore/games/tetrix/ohighscoredlg.cpp +++ b/noncore/games/tetrix/ohighscoredlg.cpp | |||
@@ -171,28 +171,21 @@ OHighscoreDialog::OHighscoreDialog(OHighscore *highscore, QWidget *parent, const | |||
171 | 171 | ||
172 | void OHighscoreDialog::createHighscoreListView() | 172 | void OHighscoreDialog::createHighscoreListView() |
173 | { | 173 | { |
174 | int pos = 10; | 174 | int pos = 10; |
175 | int points_ = 0; | 175 | int points_ = 0; |
176 | int level_ = 0; | 176 | int level_ = 0; |
177 | QListViewItem * Prev = 0; | ||
178 | 177 | ||
179 | for ( t_playerData * Run = hs_->playerData.first(); | 178 | for ( t_playerData * Run = hs_->playerData.first(); |
180 | Run != 0; | 179 | Run != 0; |
181 | Run=hs_->playerData.next() ) | 180 | Run=hs_->playerData.next() ) |
182 | { | 181 | { |
183 | QListViewItem *item; | 182 | QListViewItem *item; |
184 | 183 | ||
185 | if( Prev ) { | 184 | item = new QListViewItem( list ); |
186 | // after previous | ||
187 | item = new QListViewItem( list, Prev ); | ||
188 | Prev = item; | ||
189 | } else { | ||
190 | item = new QListViewItem( list ); | ||
191 | 185 | ||
192 | } | ||
193 | item->setText( 0 , QString::number( pos ) ); //number | 186 | item->setText( 0 , QString::number( pos ) ); //number |
194 | item->setText( 1 , Run->sName ); //name | 187 | item->setText( 1 , Run->sName ); //name |
195 | if ( Run->points == -1 ) | 188 | if ( Run->points == -1 ) |
196 | points_ = 0; | 189 | points_ = 0; |
197 | else points_ = Run->points; | 190 | else points_ = Run->points; |
198 | if ( Run->level == -1 ) | 191 | if ( Run->level == -1 ) |