[Libreoffice-commits] core.git: cui/source

Caolán McNamara caolanm at redhat.com
Fri Mar 9 13:50:29 UTC 2018


 cui/source/dialogs/colorpicker.cxx |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

New commits:
commit c5dd01c426c4a46d7fd00aaa85fe05414bb0ba2b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Mar 9 11:47:06 2018 +0000

    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 at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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;
 


More information about the Libreoffice-commits mailing list