Author: mir3x
Date: Wed Jan  6 09:17:59 2016
New Revision: 31383

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

See bug #24275


Modified:
    trunk/client/gui-qt/mapview.cpp

Modified: trunk/client/gui-qt/mapview.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/mapview.cpp?rev=31383&r1=31382&r2=31383&view=diff
==============================================================================
--- trunk/client/gui-qt/mapview.cpp     (original)
+++ trunk/client/gui-qt/mapview.cpp     Wed Jan  6 09:17:59 2016
@@ -181,14 +181,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