From b649ce123dea372359ec571135a68eb3de844e5b Mon Sep 17 00:00:00 2001 From: Jim Raykowski Date: Tue, 17 Apr 2018 18:07:39 -0800 Subject: tdf#117063 Modify tree list double click behavior in the navigator Change-Id: I369a7a2075aabd3574bdda39dac74e2b132f6923 Reviewed-on: https://gerrit.libreoffice.org/53074 Tested-by: Jenkins Reviewed-by: Heiko Tietze --- sw/source/uibase/utlui/content.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sw/source') 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(pEntry->GetUserData()); + const ContentTypeId nActType = pCnt->GetParent()->GetType(); + SetSublistDontOpenWithDoubleClick( nActType == ContentTypeId::OUTLINE ); + } SvTreeListBox::MouseButtonDown( rMEvt ); + } } // Update immediately -- cgit