summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail.com>2020-03-21 22:31:34 -0800
committerCaolán McNamara <caolanm@redhat.com>2020-03-23 17:53:47 +0100
commit05022d6cfff72d26fa3b916a4f86ac6488298dac (patch)
tree24662d48165a92dbaf854439e60d66ab75f4eebb /sw/source/uibase
parent56f47be55efcccdf1ba78873e2dbfad846dc0b8e (diff)
Keep Writer Navigator content view vertical scroll position
...when an object is renamed Change-Id: Ib8984fd67653e6bec30d9b27c2d2fbe86b7ce0c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90891 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/utlui/content.cxx21
1 files changed, 9 insertions, 12 deletions
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 340a3a90ba1f..b7f85297087a 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -1773,7 +1773,6 @@ void SwContentTree::Display( bool bActive )
nEntryRelPos = GetModel()->GetAbsPos(pOldSelEntry) - GetModel()->GetAbsPos(pParentEntry);
}
}
- SetUpdateMode( false );
SvTreeListBox::Clear();
if (!bActive)
m_eState = State::HIDDEN;
@@ -1849,7 +1848,6 @@ void SwContentTree::Display( bool bActive )
}
if(pSelEntry)
{
- MakeVisible(pSelEntry);
Select(pSelEntry);
}
else
@@ -1912,16 +1910,17 @@ void SwContentTree::Display( bool bActive )
SetCurEntry(pParent);
}
}
- ScrollBar* pVScroll = GetVScroll();
- if(GetEntryCount() == nOldEntryCount &&
- nOldScrollPos && pVScroll && pVScroll->IsVisible()
- && pVScroll->GetThumbPos() != nOldScrollPos)
+ if (!m_bIsInPromoteDemote)
{
- sal_Int32 nDelta = pVScroll->GetThumbPos() - nOldScrollPos;
- ScrollOutputArea( static_cast<short>(nDelta) );
+ ScrollBar* pVScroll = GetVScroll();
+ if(GetEntryCount() == nOldEntryCount &&
+ nOldScrollPos && pVScroll && pVScroll->IsVisible()
+ && pVScroll->GetThumbPos() != nOldScrollPos)
+ {
+ sal_Int32 nDelta = pVScroll->GetThumbPos() - nOldScrollPos;
+ ScrollOutputArea( static_cast<short>(nDelta) );
+ }
}
- if (!m_bIsInPromoteDemote)
- SetUpdateMode( true );
}
void SwContentTree::Clear()
@@ -2725,8 +2724,6 @@ void SwContentTree::ExecCommand(const OUString& rCmd, bool bOutlineWithChildren)
}
}
}
- // SetUpdateMode is set false in the Display function
- SetUpdateMode(true);
}
m_bIsInPromoteDemote = false;
}