|
|
@ -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
|
|
|
|
// This may happen when alt-tab has been used => the sheet is dragged but the left button is up
|
|
|
|
if (!CCtrlDraggable::getDraggedSheet())
|
|
|
|
if (!CCtrlDraggable::getDraggedSheet())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
for( sint32 i = _GroupsUnderPointer.size() - 1; i >= 0; i-- )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
CInterfaceGroup *g = _GroupsUnderPointer[ i ];
|
|
|
|
|
|
|
|
if( ( g != NULL ) && ( g->isInGroup( pNewCurrentWnd ) ) )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
_CapturedView = g;
|
|
|
|
|
|
|
|
captured = true;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Take the top most control.
|
|
|
|
if( !captured )
|
|
|
|
uint nMaxDepth = 0;
|
|
|
|
|
|
|
|
const std::vector< CCtrlBase* >& _CtrlsUnderPointer = getCtrlsUnderPointer();
|
|
|
|
|
|
|
|
for (sint32 i = (sint32)_CtrlsUnderPointer.size()-1; i >= 0; i--)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
CCtrlBase *ctrl= _CtrlsUnderPointer[i];
|
|
|
|
// Take the top most control.
|
|
|
|
if (ctrl && ctrl->isCapturable() && ctrl->isInGroup( pNewCurrentWnd ) )
|
|
|
|
uint nMaxDepth = 0;
|
|
|
|
|
|
|
|
const std::vector< CCtrlBase* >& _CtrlsUnderPointer = getCtrlsUnderPointer();
|
|
|
|
|
|
|
|
for (sint32 i = (sint32)_CtrlsUnderPointer.size()-1; i >= 0; i--)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uint d = ctrl->getDepth( pNewCurrentWnd );
|
|
|
|
CCtrlBase *ctrl= _CtrlsUnderPointer[i];
|
|
|
|
if (d > nMaxDepth)
|
|
|
|
if (ctrl && ctrl->isCapturable() && ctrl->isInGroup( pNewCurrentWnd ) )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
nMaxDepth = d;
|
|
|
|
uint d = ctrl->getDepth( pNewCurrentWnd );
|
|
|
|
setCapturePointerLeft( ctrl );
|
|
|
|
if (d > nMaxDepth)
|
|
|
|
captured = true;
|
|
|
|
{
|
|
|
|
|
|
|
|
nMaxDepth = d;
|
|
|
|
|
|
|
|
setCapturePointerLeft( ctrl );
|
|
|
|
|
|
|
|
captured = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|