mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-20 15:13:45 +00:00
Merge pull request #1661 from Azaezel/alpha41/clickclack
fix clicking a treeview element tripping expand/collapse
This commit is contained in:
commit
d2b63f73a8
1 changed files with 3 additions and 4 deletions
|
|
@ -3389,7 +3389,7 @@ void GuiTreeViewCtrl::onMouseDown(const GuiEvent & event)
|
|||
mPossibleRenameItem = NULL;
|
||||
mRenamingItem = NULL;
|
||||
mTempItem = NULL;
|
||||
|
||||
bool wasSelected = isSelected(item);
|
||||
//
|
||||
if( event.modifier & SI_MULTISELECT )
|
||||
{
|
||||
|
|
@ -3473,8 +3473,7 @@ void GuiTreeViewCtrl::onMouseDown(const GuiEvent & event)
|
|||
else if ( !hitFlags.test(OnImage) )
|
||||
{
|
||||
mTempItem = item;
|
||||
|
||||
bool wasSelected = isSelected( item );
|
||||
|
||||
bool multiSelect = getSelectedItemsCount() > 1;
|
||||
|
||||
if( !wasSelected || !multiSelect )
|
||||
|
|
@ -3520,7 +3519,7 @@ void GuiTreeViewCtrl::onMouseDown(const GuiEvent & event)
|
|||
return;
|
||||
|
||||
//
|
||||
if ( mFullRowSelect || hitFlags.test( OnImage ) )
|
||||
if ((mFullRowSelect || hitFlags.test(OnImage)) && wasSelected)
|
||||
{
|
||||
item->setExpanded(!item->isExpanded());
|
||||
if( !item->isInspectorData() && item->mState.test(Item::VirtualParent) )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue