VirtualBox

Ignore:
Timestamp:
Nov 15, 2023 3:54:09 PM (16 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
160231
Message:

FE/Qt: bugref:10513: VBox Manager: Update Machine tools menu right before it it shown, not on current-item change as this cache can be invalidated in the meantime.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/manager
Files:
2 edited

Legend:

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

    r102107 r102110  
    542542    {
    543543        case UIToolClass_Global: pMenu = m_pMenuToolsGlobal; break;
    544         case UIToolClass_Machine: pMenu = m_pMenuToolsMachine; break;
     544        case UIToolClass_Machine: pMenu = m_pMenuToolsMachine; updateToolsMenuMachine(); break;
    545545        default: break;
    546546    }
     
    11171117}
    11181118
    1119 void UIVirtualBoxManagerWidget::recacheCurrentItemInformation(bool fDontRaiseErrorPane /* = false */)
     1119void UIVirtualBoxManagerWidget::updateToolsMenuMachine()
    11201120{
    11211121    /* Get current item: */
     
    11361136    foreach (const UIToolType &enmRestrictedType, retrictedTypes)
    11371137        m_pPaneToolsMachine->closeTool(enmRestrictedType);
     1138}
     1139
     1140void UIVirtualBoxManagerWidget::recacheCurrentItemInformation(bool fDontRaiseErrorPane /* = false */)
     1141{
     1142    /* Get current item: */
     1143    UIVirtualMachineItem *pItem = currentItem();
     1144    const bool fCurrentItemIsOk = pItem && pItem->accessible();
    11381145
    11391146    /* Propagate current item anyway: */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.h

    r102098 r102110  
    341341    /** @name Tools / Common stuff.
    342342      * @{ */
     343        /** Updates Machine tools menu. */
     344        void updateToolsMenuMachine();
     345
    343346        /** Recaches current item information.
    344347          * @param  fDontRaiseErrorPane  Brings whether we should not raise error-pane. */
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