mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 08:14:47 -07:00
fix for rare condition when the game screen would remain white when the game starts
This commit is contained in:
parent
40fbbc5982
commit
a319ce3afb
6 changed files with 24 additions and 21 deletions
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue