Kaydet (Commit) 582b2ed5 authored tarafından Jim Raykowski's avatar Jim Raykowski Kaydeden (comit) Thorsten Behrens

tdf#36308 make double click not expand/collapse node in Navigator tree

Change-Id: I0075af147e5aa02f09db57fc2113dcdfcab5bc57
Reviewed-on: https://gerrit.libreoffice.org/47241Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarHeiko Tietze <tietze.heiko@gmail.com>
Tested-by: 's avatarHeiko Tietze <tietze.heiko@gmail.com>
Reviewed-by: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
üst f66fbd94
......@@ -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
......
......@@ -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 );
......
......@@ -1434,6 +1434,11 @@ void SvTreeListBox::SetSublistOpenWithLeftRight()
pImpl->bSubLstOpLR = true;
}
void SvTreeListBox::SetSublistNotOpenWithDoubleClick()
{
pImpl->bSubLstOpDblClick = false;
}
void SvTreeListBox::Resize()
{
if( IsEditingActive() )
......
......@@ -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;
......
......@@ -858,6 +858,7 @@ SwContentTree::SwContentTree(vcl::Window* pParent, SwNavigationPI* pDialog)
, m_bViewHasChanged(false)
, m_bIsKeySpace(false)
{
SetSublistNotOpenWithDoubleClick();
SetHelpId(HID_NAVIGATOR_TREELIST);
SetNodeDefaultImages();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment