mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-24 09:58:46 +00:00
Select groups first.
This commit is contained in:
parent
7504dc1238
commit
4d06c3c278
1 changed files with 25 additions and 12 deletions
|
@ -2400,21 +2400,34 @@ namespace NLGUI
|
|||
// This may happen when alt-tab has been used => the sheet is dragged but the left button is up
|
||||
if (!CCtrlDraggable::getDraggedSheet())
|
||||
{
|
||||
|
||||
// Take the top most control.
|
||||
uint nMaxDepth = 0;
|
||||
const std::vector< CCtrlBase* >& _CtrlsUnderPointer = getCtrlsUnderPointer();
|
||||
for (sint32 i = (sint32)_CtrlsUnderPointer.size()-1; i >= 0; i--)
|
||||
for( sint32 i = _GroupsUnderPointer.size() - 1; i >= 0; i-- )
|
||||
{
|
||||
CCtrlBase *ctrl= _CtrlsUnderPointer[i];
|
||||
if (ctrl && ctrl->isCapturable() && ctrl->isInGroup( pNewCurrentWnd ) )
|
||||
CInterfaceGroup *g = _GroupsUnderPointer[ i ];
|
||||
if( ( g != NULL ) && ( g->isInGroup( pNewCurrentWnd ) ) )
|
||||
{
|
||||
uint d = ctrl->getDepth( pNewCurrentWnd );
|
||||
if (d > nMaxDepth)
|
||||
_CapturedView = g;
|
||||
captured = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if( !captured )
|
||||
{
|
||||
// Take the top most control.
|
||||
uint nMaxDepth = 0;
|
||||
const std::vector< CCtrlBase* >& _CtrlsUnderPointer = getCtrlsUnderPointer();
|
||||
for (sint32 i = (sint32)_CtrlsUnderPointer.size()-1; i >= 0; i--)
|
||||
{
|
||||
CCtrlBase *ctrl= _CtrlsUnderPointer[i];
|
||||
if (ctrl && ctrl->isCapturable() && ctrl->isInGroup( pNewCurrentWnd ) )
|
||||
{
|
||||
nMaxDepth = d;
|
||||
setCapturePointerLeft( ctrl );
|
||||
captured = true;
|
||||
uint d = ctrl->getDepth( pNewCurrentWnd );
|
||||
if (d > nMaxDepth)
|
||||
{
|
||||
nMaxDepth = d;
|
||||
setCapturePointerLeft( ctrl );
|
||||
captured = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue