From f7530ccf9ce71efcb00cda56ee9d71e7765e6f79 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 19 Feb 2012 00:25:05 +0000 Subject: Corrected location of entities on the map. --- src/mapwidget.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mapwidget.cc b/src/mapwidget.cc index 32ec3a0..94bed61 100644 --- a/src/mapwidget.cc +++ b/src/mapwidget.cc @@ -46,8 +46,8 @@ void MapWidget::resizeChildren() for (int i = 0; i < mapwidget_enties.size(); ++i) { MapEntity * entity = mapwidget_enties.at(i); int iconsize = 12; - int x = width() / 2 + (int) (entity->location(0) * scale) - iconsize /2; - int y = height() / 2 + (int)(entity->location(1) * scale) - iconsize /2; + int x = width() / 2 - (int) (entity->location(1) * scale) - iconsize /2; + int y = height() / 2 - (int)(entity->location(0) * scale) - iconsize /2; entity->setGeometry(x, y, iconsize, iconsize); //qDebug() << "Moving entity to " << x << " " << y; -- cgit v1.2.3