scroll-list column headers now work on single-click. Also improved focus handling for scroll-lists.
This commit is contained in:
@@ -747,10 +747,10 @@ void LLComboBox::onButtonDown(void *userdata)
|
|||||||
self->setFocus( TRUE );
|
self->setFocus( TRUE );
|
||||||
|
|
||||||
// pass mouse capture on to list if button is depressed
|
// pass mouse capture on to list if button is depressed
|
||||||
if (self->mButton->hasMouseCapture())
|
/*if (self->mButton->hasMouseCapture())
|
||||||
{
|
{
|
||||||
gFocusMgr.setMouseCapture(self->mList);
|
gFocusMgr.setMouseCapture(self->mList);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3300,6 +3300,12 @@ public:
|
|||||||
// called to rebuild the draw label
|
// called to rebuild the draw label
|
||||||
virtual void buildDrawLabel( void );
|
virtual void buildDrawLabel( void );
|
||||||
|
|
||||||
|
virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask)
|
||||||
|
{
|
||||||
|
LLMenuItemGL::handleMouseUp(x,y,mask);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
// doIt() - do the primary funcationality of the menu item.
|
// doIt() - do the primary funcationality of the menu item.
|
||||||
virtual void doIt( void );
|
virtual void doIt( void );
|
||||||
|
|
||||||
@@ -3448,6 +3454,18 @@ void LLPieMenu::initXML(LLXMLNodePtr node, LLView *context, LLUICtrlFactory *fac
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool LLPieMenu::addChild(LLView* view, S32 tab_group)
|
||||||
|
{
|
||||||
|
if(LLMenuGL::addChild(view, tab_group))
|
||||||
|
{
|
||||||
|
LLMenuItemSeparatorGL* sep = dynamic_cast<LLMenuItemSeparatorGL*>(view);
|
||||||
|
if(sep)
|
||||||
|
sep->setVisible(false);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// virtual
|
// virtual
|
||||||
void LLPieMenu::setVisible(BOOL visible)
|
void LLPieMenu::setVisible(BOOL visible)
|
||||||
{
|
{
|
||||||
@@ -3929,7 +3947,10 @@ LLMenuItemGL *LLPieMenu::pieItemFromXY(S32 x, S32 y)
|
|||||||
{
|
{
|
||||||
if (which == 0)
|
if (which == 0)
|
||||||
{
|
{
|
||||||
return (*item_iter);
|
if((*item_iter)->getVisible())
|
||||||
|
return (*item_iter);
|
||||||
|
else
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
which--;
|
which--;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -697,6 +697,9 @@ public:
|
|||||||
void initXML(LLXMLNodePtr node, LLView *context, LLUICtrlFactory *factory);
|
void initXML(LLXMLNodePtr node, LLView *context, LLUICtrlFactory *factory);
|
||||||
|
|
||||||
// LLView Functionality
|
// LLView Functionality
|
||||||
|
// hide separators. they are added to 'pad' in empty cells.
|
||||||
|
virtual bool addChild(LLView* view, S32 tab_group = 0);
|
||||||
|
|
||||||
// can't set visibility directly, must call show or hide
|
// can't set visibility directly, must call show or hide
|
||||||
virtual void setVisible(BOOL visible);
|
virtual void setVisible(BOOL visible);
|
||||||
|
|
||||||
|
|||||||
@@ -2135,6 +2135,8 @@ BOOL LLScrollListCtrl::handleMouseDown(S32 x, S32 y, MASK mask)
|
|||||||
mSelectionChanged = FALSE;
|
mSelectionChanged = FALSE;
|
||||||
|
|
||||||
handleClick(x, y, mask);
|
handleClick(x, y, mask);
|
||||||
|
|
||||||
|
setFocus(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -3898,6 +3900,8 @@ void LLColumnHeader::onClick(void* user_data)
|
|||||||
|
|
||||||
// propagate new sort order to sort order list
|
// propagate new sort order to sort order list
|
||||||
headerp->mList->selectNthItem(column->mParentCtrl->getSortAscending() ? 0 : 1);
|
headerp->mList->selectNthItem(column->mParentCtrl->getSortAscending() ? 0 : 1);
|
||||||
|
|
||||||
|
headerp->mList->setFocus(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
//static
|
//static
|
||||||
|
|||||||
Reference in New Issue
Block a user