summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/image.cxx
diff options
context:
space:
mode:
authorKeith Curtis <keithcu@gmail.com>2013-12-20 14:19:19 +0100
committerJan Holesovsky <kendy@collabora.com>2013-12-20 14:23:35 +0100
commit7347482cc360ad3dc9ed77047441c2e30476fed3 (patch)
tree7f56a9063dea777562d797ae720cd58d2b4e7de4 /vcl/source/gdi/image.cxx
parenta130de7e00bb426b15ec3b0ffc6bffc652d174ab (diff)
hidpi: Make many places Hi-DPI aware.
This also introduces a getter for the mnDPIScaleFactor variable. Change-Id: I02ba6858fb1842f911d62976f4c54afc3bfa337f
Diffstat (limited to 'vcl/source/gdi/image.cxx')
-rw-r--r--vcl/source/gdi/image.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/vcl/source/gdi/image.cxx b/vcl/source/gdi/image.cxx
index 1384e0b1e14d..4b4b204ce4fe 100644
--- a/vcl/source/gdi/image.cxx
+++ b/vcl/source/gdi/image.cxx
@@ -513,11 +513,10 @@ void ImageList::ReplaceImage( const OUString& rImageName, const Image& rImage )
if( nId )
{
- RemoveImage( nId );
-
- if( !mpImplData )
- ImplInit( 0, rImage.GetSizePixel() );
- mpImplData->AddImage( rImageName, nId, rImage.GetBitmapEx());
+ //Just replace the bitmap rather than doing RemoveImage / AddImage
+ //which breaks index-based iteration.
+ ImageAryData *pImg = mpImplData->maNameHash[ rImageName ];
+ pImg->maBitmapEx = rImage.GetBitmapEx();
}
}