VirtualBox

Ignore:
Timestamp:
Oct 28, 2015 2:22:24 PM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: 8092: Selector UI: Chooser pane: Stop scrolling when drag event is out of chooser-pane area.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp

    r57844 r58446  
    55
    66/*
    7  * Copyright (C) 2012-2013 Oracle Corporation
     7 * Copyright (C) 2012-2015 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    13801380        case QEvent::GraphicsSceneContextMenu:
    13811381            return processContextMenuEvent(static_cast<QGraphicsSceneContextMenuEvent*>(pEvent));
    1382         /* Drag&drop scroll-event handler: */
     1382        /* Drag&drop scroll-event(drag-move) handler: */
    13831383        case QEvent::GraphicsSceneDragMove:
    13841384            return processDragMoveEvent(static_cast<QGraphicsSceneDragDropEvent*>(pEvent));
     1385        /* Drag&drop scroll-event(drag-leave) handler: */
     1386        case QEvent::GraphicsSceneDragLeave:
     1387            return processDragLeaveEvent(static_cast<QGraphicsSceneDragDropEvent*>(pEvent));
    13851388    }
    13861389
     
    16851688}
    16861689
     1690bool UIGChooserModel::processDragLeaveEvent(QGraphicsSceneDragDropEvent *pEvent)
     1691{
     1692    /* Event object is not required here: */
     1693    Q_UNUSED(pEvent);
     1694
     1695    /* Make sure to stop scrolling as drag-leave event happened: */
     1696    if (m_fIsScrollingInProgress)
     1697        m_fIsScrollingInProgress = false;
     1698
     1699    /* Pass event: */
     1700    return false;
     1701}
     1702
    16871703void UIGChooserModel::loadGroupTree()
    16881704{
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.h

    r57039 r58446  
    55
    66/*
    7  * Copyright (C) 2012 Oracle Corporation
     7 * Copyright (C) 2012-2015 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    261261    /* Handler: Drag&drop event: */
    262262    bool processDragMoveEvent(QGraphicsSceneDragDropEvent *pEvent);
     263    bool processDragLeaveEvent(QGraphicsSceneDragDropEvent *pEvent);
    263264
    264265    /* Helpers: Loading stuff: */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette