fix for rare condition when the game screen would remain white when the game starts

This commit is contained in:
Max-Wilhelm Bruker 2012-04-01 21:15:13 +02:00
parent 40fbbc5982
commit a319ce3afb
6 changed files with 24 additions and 21 deletions

View file

@ -8,7 +8,7 @@ GameView::GameView(QGraphicsScene *scene, QWidget *parent)
: QGraphicsView(scene, parent), rubberBand(0)
{
setBackgroundBrush(QBrush(QColor(0, 0, 0)));
setRenderHints(QPainter::TextAntialiasing | QPainter::Antialiasing/* | QPainter::SmoothPixmapTransform*/);
setRenderHints(QPainter::TextAntialiasing | QPainter::Antialiasing);
setFocusPolicy(Qt::NoFocus);
setViewportUpdateMode(BoundingRectViewportUpdate);
@ -31,9 +31,9 @@ void GameView::resizeEvent(QResizeEvent *event)
QGraphicsView::resizeEvent(event);
GameScene *s = dynamic_cast<GameScene *>(scene());
if (s) {
if (s)
s->processViewSizeChange(event->size());
}
updateSceneRect(scene()->sceneRect());
}