VirtualBox

Changeset 108276 in vbox


Ignore:
Timestamp:
Feb 18, 2025 12:10:19 PM (3 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
167604
Message:

FE/Qt: bugref:10814: VBox Manager / Tool-pane: Small cleanup for current-item handling.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsModel.cpp

    r108275 r108276  
    319319        return QObject::eventFilter(pWatched, pEvent);
    320320
    321     /* Do not handle disabled items: */
    322     if (!currentItem()->isEnabled())
    323         return QObject::eventFilter(pWatched, pEvent);
    324 
    325321    /* Checking event-type: */
    326322    switch (pEvent->type())
     
    335331            if (QGraphicsItem *pItemUnderMouse = itemAt(scenePos))
    336332            {
    337                 /* Which item we just clicked? */
     333                /* Which item we just clicked? Is it enabled? */
    338334                UIToolsItem *pClickedItem = qgraphicsitem_cast<UIToolsItem*>(pItemUnderMouse);
    339                 if (pClickedItem)
     335                if (pClickedItem && pClickedItem->isEnabled())
    340336                {
    341337                    /* Handle known item classes: */
     
    568564
    569565    /* Update values depending on model class: */
    570     if (m_pCurrentItem)
     566    if (currentItem())
    571567    {
    572568        if (m_enmClass == UIToolClass_Global)
    573             enmTypeGlobal = m_pCurrentItem->itemType();
     569            enmTypeGlobal = currentItem()->itemType();
    574570        else if (m_enmClass == UIToolClass_Machine)
    575             enmTypeMachine = m_pCurrentItem->itemType();
     571            enmTypeMachine = currentItem()->itemType();
    576572    }
    577573
Note: See TracChangeset for help on using the changeset viewer.

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