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

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Mon Mar 2 07:09:39 UTC 2020


 sw/source/uibase/utlui/content.cxx |   11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

New commits:
commit 413898573805c5f96ae7cc561fdc2125575084a4
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Mar 2 07:59:56 2020 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Mon Mar 2 08:09:05 2020 +0100

    Revert "Stop Navigator content view flashing"
    
    This reverts commit 201a7652092c6a7796a59e6ddee144e4f0c9ece9.  Was this
    submitted in the wrong order?  There is no m_bIsInPromoteDemote across the code
    base.
    
    Change-Id: I85cfbb797fccfd0c03c1ec19a792da8e10c7acde
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89806
    Tested-by: Stephan Bergmann <sbergman at redhat.com>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 47bb9e560a7a..dcfa88e668d7 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -1773,8 +1773,8 @@ void SwContentTree::Display( bool bActive )
             nEntryRelPos = GetModel()->GetAbsPos(pOldSelEntry) - GetModel()->GetAbsPos(pParentEntry);
         }
     }
+    Clear();
     SetUpdateMode( false );
-    SvTreeListBox::Clear();
     if (!bActive)
         m_eState = State::HIDDEN;
     else if (State::HIDDEN == m_eState)
@@ -1912,6 +1912,7 @@ void SwContentTree::Display( bool bActive )
                 SetCurEntry(pParent);
         }
     }
+    SetUpdateMode( true );
     ScrollBar* pVScroll = GetVScroll();
     if(GetEntryCount() == nOldEntryCount &&
         nOldScrollPos && pVScroll && pVScroll->IsVisible()
@@ -1920,8 +1921,6 @@ void SwContentTree::Display( bool bActive )
         sal_Int32 nDelta = pVScroll->GetThumbPos() - nOldScrollPos;
         ScrollOutputArea( static_cast<short>(nDelta) );
     }
-    if (!m_bIsInPromoteDemote)
-        SetUpdateMode( true );
 }
 
 void SwContentTree::Clear()
@@ -2721,8 +2720,6 @@ void SwContentTree::ExecCommand(const OUString& rCmd, bool bOutlineWithChildren)
             }
             SvTreeListBox::Invalidate();
         }
-        // SetUpdateMode is set false in the Display function
-        SetUpdateMode(true);
     }
 }
 
@@ -2734,10 +2731,6 @@ void SwContentTree::ShowTree()
 void SwContentTree::Paint( vcl::RenderContext& rRenderContext,
                            const tools::Rectangle& rRect )
 {
-    // prevent focus rect from flashing when tree is cleared
-    // SvTreeListBox::Paint shows focus rectangle when tree is empty
-    if (!GetEntryCount())
-        return;
     // Start the update timer on the first paint; avoids
     // flicker on the first reveal.
     m_aUpdTimer.Start();


More information about the Libreoffice-commits mailing list