summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail.com>2018-04-17 18:07:39 -0800
committerHeiko Tietze <tietze.heiko@gmail.com>2018-04-29 08:46:46 +0200
commitb649ce123dea372359ec571135a68eb3de844e5b (patch)
tree30ebce4d1cc50176b5fad79301af2ef8530ea6fe /sw/source
parent1383eed79fc5af8d7ac222b223266f54d0e66de2 (diff)
tdf#117063 Modify tree list double click behavior in the navigator
Change-Id: I369a7a2075aabd3574bdda39dac74e2b132f6923 Reviewed-on: https://gerrit.libreoffice.org/53074 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/uibase/utlui/content.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 4fe719131123..06bb5ad1c701 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -858,7 +858,6 @@ SwContentTree::SwContentTree(vcl::Window* pParent, SwNavigationPI* pDialog)
, m_bViewHasChanged(false)
, m_bIsKeySpace(false)
{
- SetSublistDontOpenWithDoubleClick();
SetHelpId(HID_NAVIGATOR_TREELIST);
SetNodeDefaultImages();
@@ -2705,7 +2704,15 @@ void SwContentTree::MouseButtonDown( const MouseEvent& rMEvt )
if( !pEntry && rMEvt.IsLeft() && rMEvt.IsMod1() && (rMEvt.GetClicks() % 2) == 0)
Control::MouseButtonDown( rMEvt );
else
+ {
+ if( pEntry && (rMEvt.GetClicks() % 2) == 0)
+ {
+ SwContent* pCnt = static_cast<SwContent*>(pEntry->GetUserData());
+ const ContentTypeId nActType = pCnt->GetParent()->GetType();
+ SetSublistDontOpenWithDoubleClick( nActType == ContentTypeId::OUTLINE );
+ }
SvTreeListBox::MouseButtonDown( rMEvt );
+ }
}
// Update immediately