X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1d8340b95698d5e27a72bd1aee423a0b954e85b1..d2e66707deb10dea6f92e3e4092f8a43ef942a5d:/src/propgrid/property.cpp

diff --git a/src/propgrid/property.cpp b/src/propgrid/property.cpp
index d0f4aa31fe..1e4f0cdfac 100644
--- a/src/propgrid/property.cpp
+++ b/src/propgrid/property.cpp
@@ -24,6 +24,7 @@
     #include "wx/hash.h"
     #include "wx/string.h"
     #include "wx/log.h"
+    #include "wx/math.h"
     #include "wx/event.h"
     #include "wx/window.h"
     #include "wx/panel.h"
@@ -2103,8 +2104,8 @@ void wxPGProperty::SetValueImage( wxBitmap& bmp )
             // Here we use high-quality wxImage scaling functions available
             wxImage img = bmp.ConvertToImage();
             double scaleY = (double)maxSz.y / (double)imSz.y;
-            img.Rescale(((double)bmp.GetWidth())*scaleY,
-                        ((double)bmp.GetHeight())*scaleY,
+            img.Rescale(wxRound(bmp.GetWidth()*scaleY),
+                        wxRound(bmp.GetHeight()*scaleY),
                         wxIMAGE_QUALITY_HIGH);
             wxBitmap* bmpNew = new wxBitmap(img, 32);
         #else