diff options
author | Jim Raykowski <raykowj@gmail.com> | 2018-01-01 14:52:41 -0900 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2018-01-11 11:30:08 +0100 |
commit | 582b2ed5ba25657afc2c2d45860899325b3b2450 (patch) | |
tree | 60ec98ab10f80fb2da3a08ab8beb3d73e3c344b7 | |
parent | f66fbd947f70f6be6b22ab372facaeb9e2fb63ae (diff) |
tdf#36308 make double click not expand/collapse node in Navigator tree
Change-Id: I0075af147e5aa02f09db57fc2113dcdfcab5bc57
Reviewed-on: https://gerrit.libreoffice.org/47241
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com>
Tested-by: Heiko Tietze <tietze.heiko@gmail.com>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rw-r--r-- | include/svtools/treelistbox.hxx | 1 | ||||
-rw-r--r-- | svtools/source/contnr/svimpbox.cxx | 11 | ||||
-rw-r--r-- | svtools/source/contnr/treelistbox.cxx | 5 | ||||
-rw-r--r-- | svtools/source/inc/svimpbox.hxx | 1 | ||||
-rw-r--r-- | sw/source/uibase/utlui/content.cxx | 1 |
5 files changed, 15 insertions, 4 deletions
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx index e7f72b3b15be..12bfa4a11439 100644 --- a/include/svtools/treelistbox.hxx +++ b/include/svtools/treelistbox.hxx @@ -649,6 +649,7 @@ public: void SetSublistOpenWithReturn(); // open/close sublist with return/enter void SetSublistOpenWithLeftRight(); // open/close sublist with cursor left/right + void SetSublistNotOpenWithDoubleClick(); // do not open/close sublist with mouse double click on entry void EnableInplaceEditing( bool bEnable ); // Edits the Entry's first StringItem, 0 == Cursor diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index 8c3f8ed0e093..1b0e4ac4f509 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -2037,10 +2037,13 @@ void SvImpLBox::MouseButtonDown( const MouseEvent& rMEvt ) } if( pEntry->HasChildren() || pEntry->HasChildrenOnDemand() ) { - if( pView->IsExpanded(pEntry) ) - pView->Collapse( pEntry ); - else - pView->Expand( pEntry ); + if( bSubLstOpDblClick ) + { + if( pView->IsExpanded(pEntry) ) + pView->Collapse( pEntry ); + else + pView->Expand( pEntry ); + } if( pEntry == pCursor ) // only if Entryitem was clicked // (Nodebutton is not an Entryitem!) pView->Select( pCursor ); diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 02e5d0416c91..c3da96e85bf5 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -1434,6 +1434,11 @@ void SvTreeListBox::SetSublistOpenWithLeftRight() pImpl->bSubLstOpLR = true; } +void SvTreeListBox::SetSublistNotOpenWithDoubleClick() +{ + pImpl->bSubLstOpDblClick = false; +} + void SvTreeListBox::Resize() { if( IsEditingActive() ) diff --git a/svtools/source/inc/svimpbox.hxx b/svtools/source/inc/svimpbox.hxx index 373c715e3577..5b69e16c479f 100644 --- a/svtools/source/inc/svimpbox.hxx +++ b/svtools/source/inc/svimpbox.hxx @@ -135,6 +135,7 @@ private: bool bAsyncBeginDrag : 1; bool bSubLstOpRet : 1; // open/close sublist with return/enter, defaulted with false bool bSubLstOpLR : 1; // open/close sublist with cursor left/right, defaulted with false + bool bSubLstOpDblClick : 1; // open/close sublist with mouse double click, defaulted with true bool bContextMenuHandling : 1; bool bIsCellFocusEnabled : 1; bool bAreChildrenTransient; diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 6f1e71e5b0c6..29b0b19ffb2d 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -858,6 +858,7 @@ SwContentTree::SwContentTree(vcl::Window* pParent, SwNavigationPI* pDialog) , m_bViewHasChanged(false) , m_bIsKeySpace(false) { + SetSublistNotOpenWithDoubleClick(); SetHelpId(HID_NAVIGATOR_TREELIST); SetNodeDefaultImages(); |