diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-03-09 11:47:06 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-03-09 14:48:05 +0100 |
commit | c5dd01c426c4a46d7fd00aaa85fe05414bb0ba2b (patch) | |
tree | 7c8221fe7d4a14b3e25da8d2b7bdc8f8c5bc94ac /cui/source | |
parent | 3af025f0fe0daa1de24eb3ac80797cd618d06ec3 (diff) |
color slider behaviour changed
since...
commit db42098d99bd8648fcd7b6f669e3e5ad4142670a
Date: Fri Feb 9 10:47:48 2018 +0200
use VirtualDevice in ColorFieldControl
as part of moving use of BitmapWriteAccess inside of vcl/
Change-Id: Id2edd8a7f0246ff710a19ae65ddde776429dabce
Reviewed-on: https://gerrit.libreoffice.org/50994
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/dialogs/colorpicker.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx index 3557e1401f54..756c0d5aed6f 100644 --- a/cui/source/dialogs/colorpicker.cxx +++ b/cui/source/dialogs/colorpicker.cxx @@ -629,12 +629,14 @@ void ColorSliderControl::UpdateBitmap() { Size aSize(1, GetOutputSizePixel().Height()); - if (mxBitmap && mxBitmap->GetOutputSizePixel() == aSize) - return; + if (mxBitmap && mxBitmap->GetOutputSizePixel() != aSize) + mxBitmap.disposeAndClear(); - mxBitmap.disposeAndClear(); - mxBitmap = VclPtr<VirtualDevice>::Create(); - mxBitmap->SetOutputSizePixel(aSize); + if (!mxBitmap) + { + mxBitmap = VclPtr<VirtualDevice>::Create(); + mxBitmap->SetOutputSizePixel(aSize); + } const long nY = aSize.Height() - 1; |