diff options
Diffstat (limited to 'vcl/source/gdi/impgraph.cxx')
-rw-r--r-- | vcl/source/gdi/impgraph.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index 372b93bec360..0a215fede7b0 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -1562,7 +1562,15 @@ bool ImpGraphic::loadPrepared() if (mpGfxLink->LoadNative(aGraphic)) { GraphicExternalLink aLink = maGraphicExternalLink; + + Size aPrefSize = maSwapInfo.maPrefSize; *this = *aGraphic.ImplGetImpGraphic(); + if (aPrefSize.getWidth() && aPrefSize.getHeight()) + { + // Use custom preferred size if it was set when the graphic was still unloaded. + ImplSetPrefSize(aPrefSize); + } + maGraphicExternalLink = aLink; return true; |