Fix for floating point conversion

This commit is contained in:
Max-Wilhelm Bruker 2009-07-17 21:32:04 +02:00
parent ecc6f7b20f
commit 84f06503c6
2 changed files with 2 additions and 2 deletions

View file

@ -133,7 +133,7 @@ QPoint TableZone::mapToGrid(const QPointF &mapPoint) const
else if (y > height - CARD_HEIGHT)
y = height - CARD_HEIGHT;
return QPoint(round(((double) x * gridPointsPerCardX) / CARD_WIDTH), round(((double) y * gridPointsPerCardY) / CARD_HEIGHT));
return QPoint((int) round(((double) x * gridPointsPerCardX) / CARD_WIDTH), (int) round(((double) y * gridPointsPerCardY) / CARD_HEIGHT));
}
QPoint TableZone::getFreeGridPoint(int row) const