Author: mir3x
Date: Wed Jan  6 09:17:24 2016
New Revision: 31381

URL: http://svn.gna.org/viewcvs/freeciv?rev=31381&view=rev
Log:
Fixed repainting mapview, now it will repaint only given rectangle.

See bug #24275


Modified:
    branches/S2_5/client/gui-qt/mapview.cpp

Modified: branches/S2_5/client/gui-qt/mapview.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-qt/mapview.cpp?rev=31381&r1=31380&r2=31381&view=diff
==============================================================================
--- branches/S2_5/client/gui-qt/mapview.cpp     (original)
+++ branches/S2_5/client/gui-qt/mapview.cpp     Wed Jan  6 09:17:24 2016
@@ -180,14 +180,12 @@
 }
 
 /**************************************************************************
-  Redraws visible map
+  Redraws given rectangle on map
 **************************************************************************/
 void map_view::paint(QPainter *painter, QPaintEvent *event)
 {
-  int width = mapview.store->map_pixmap.width();
-  int height = mapview.store->map_pixmap.height();
-
-  painter->drawPixmap(0, 0, width, height, mapview.store->map_pixmap);
+  painter->drawPixmap(event->rect(), mapview.store->map_pixmap,
+                      event->rect());
 }
 
 /**************************************************************************


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to