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

Jim Raykowski raykowj at gmail.com
Thu Jan 11 10:30:41 UTC 2018


 include/svtools/treelistbox.hxx       |    1 +
 svtools/source/contnr/svimpbox.cxx    |   11 +++++++----
 svtools/source/contnr/treelistbox.cxx |    5 +++++
 svtools/source/inc/svimpbox.hxx       |    1 +
 sw/source/uibase/utlui/content.cxx    |    1 +
 5 files changed, 15 insertions(+), 4 deletions(-)

New commits:
commit 582b2ed5ba25657afc2c2d45860899325b3b2450
Author: Jim Raykowski <raykowj at gmail.com>
Date:   Mon Jan 1 14:52:41 2018 -0900

    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 at libreoffice.org>
    Reviewed-by: Heiko Tietze <tietze.heiko at gmail.com>
    Tested-by: Heiko Tietze <tietze.heiko at gmail.com>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

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();


More information about the Libreoffice-commits mailing list