VirtualBox

Changeset 73674 in vbox


Ignore:
Timestamp:
Aug 14, 2018 6:49:28 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: VirtualBox Manager UI: Properly update action visibility.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp

    r73673 r73674  
    18831883{
    18841884    /* Determine whether Machine or Group menu should be shown at all: */
    1885     const bool fMachineOrGroupMenuShown = m_pWidget->isMachineItemSelected();
     1885    const bool fMachineOrGroupMenuShown = m_pWidget->isMachineItemSelected() || m_pWidget->isGroupItemSelected();
    18861886    const bool fMachineMenuShown = !isSingleGroupSelected();
    18871887    m_pMachineMenuAction->setVisible(fMachineOrGroupMenuShown && fMachineMenuShown);
     
    18921892        foreach (UIAction *pAction, m_machineActions)
    18931893            pAction->hideShortcut();
    1894     if (fMachineMenuShown)
     1894    else
    18951895        foreach (UIAction *pAction, m_groupActions)
    18961896            pAction->hideShortcut();
     
    18991899    foreach (UIAction *pAction, m_machineActions)
    19001900        pAction->setVisible(fMachineOrGroupMenuShown);
    1901 
    1902     /* Show what should be shown: */
     1901    foreach (UIAction *pAction, m_groupActions)
     1902        pAction->setVisible(fMachineOrGroupMenuShown);
     1903
     1904    /* Show action shortcuts: */
    19031905    if (fMachineMenuShown)
    19041906        foreach (UIAction *pAction, m_machineActions)
    19051907            pAction->showShortcut();
    1906     if (!fMachineMenuShown)
     1908    else
    19071909        foreach (UIAction *pAction, m_groupActions)
    19081910            pAction->showShortcut();
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