[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - svtools/source

Miklos Vajna vmiklos at collabora.co.uk
Wed Dec 23 08:21:38 PST 2015


 svtools/source/contnr/svimpbox.cxx |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

New commits:
commit ad70b07e728c726e50a909d06b057072e7a0f1f3
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Dec 21 14:41:26 2015 +0100

    tdf#96637 svtools: fix missing highlight of selected entry in list box
    
    Regression from 87199d3829257420429057336283c55be6ae7481 (vcl:
    re-introduce idle handling., 2015-11-24), this probably worked
    previously as the idle repaint triggered SvImpLBox::Paint() multiple (at
    least two) times, so in the first run it could mark the first entry in
    the list box as selected/highlighted, and then the second run it could
    paint accordingly.
    
    Now it's called only once, so it's required that selecting the first
    entry happens before the actual painting.
    
    With this, the certificate selection dialog has the default signing
    certificate pre-selected again.
    
    (cherry picked from commit 171ca32e02976022858b9f0affb532a35c495833)
    
    Change-Id: I0546bf673f44f4270e36b9bbf02bb723f23d6160
    Reviewed-on: https://gerrit.libreoffice.org/20850
    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/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index 17b8c76..fbe6a32 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -937,6 +937,13 @@ void SvImpLBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect
 
     rRenderContext.SetClipRegion(aClipRegion);
 
+    if (!pCursor && ((nExtendedWinBits & EWB_NO_AUTO_CURENTRY) == 0))
+    {
+        // do not select if multiselection or explicit set
+        bool bNotSelect = (aSelEng.GetSelectionMode() == MULTIPLE_SELECTION ) || ((m_nStyle & WB_NOINITIALSELECTION) == WB_NOINITIALSELECTION);
+        SetCursor(pStartEntry, bNotSelect);
+    }
+
     for(sal_uInt16 n=0; n< nCount && pEntry; n++)
     {
         /*long nMaxRight=*/
@@ -945,13 +952,6 @@ void SvImpLBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect
         pEntry = pView->NextVisible(pEntry);
     }
 
-    if (!pCursor && ((nExtendedWinBits & EWB_NO_AUTO_CURENTRY) == 0))
-    {
-        // do not select if multiselection or explicit set
-        bool bNotSelect = (aSelEng.GetSelectionMode() == MULTIPLE_SELECTION ) || ((m_nStyle & WB_NOINITIALSELECTION) == WB_NOINITIALSELECTION);
-        SetCursor(pStartEntry, bNotSelect);
-    }
-
     nFlags &= (~F_DESEL_ALL);
     rRenderContext.SetClipRegion();
     if (!(nFlags & F_PAINTED))


More information about the Libreoffice-commits mailing list