diff options
author | Keith Curtis <keithcu@gmail.com> | 2013-12-20 14:19:19 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2013-12-20 14:23:35 +0100 |
commit | 7347482cc360ad3dc9ed77047441c2e30476fed3 (patch) | |
tree | 7f56a9063dea777562d797ae720cd58d2b4e7de4 /vcl/source/gdi/image.cxx | |
parent | a130de7e00bb426b15ec3b0ffc6bffc652d174ab (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.cxx | 9 |
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(); } } |