VirtualBox

Changeset 102422 in vbox


Ignore:
Timestamp:
Dec 1, 2023 2:17:26 PM (16 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
160565
Message:

FE/Qt: bugref:10513: VBox Manager / Tools pane: Make sure machine item info is fetched only if machine is Ok, i.e. accessible; Otherwise fetch last access error only.

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

Legend:

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

    r102421 r102422  
    370370    }
    371371
    372     /* Recache current item info if machine or group item selected: */
    373     if (isMachineItemSelected() || isGroupItemSelected())
    374         recacheCurrentItemInformation();
     372    /* Recache current machine item information: */
     373    recacheCurrentMachineItemInformation();
    375374}
    376375
     
    454453        updateToolsMenuGlobal();
    455454
    456     /* Recache current item info if machine or group item selected: */
    457     if (isMachineItemSelected() || isGroupItemSelected())
    458         recacheCurrentItemInformation();
     455    /* Recache current machine item information: */
     456    recacheCurrentMachineItemInformation();
    459457
    460458    /* Calculate selection type: */
     
    11671165}
    11681166
    1169 void UIVirtualBoxManagerWidget::recacheCurrentItemInformation(bool fDontRaiseErrorPane /* = false */)
    1170 {
     1167void UIVirtualBoxManagerWidget::recacheCurrentMachineItemInformation(bool fDontRaiseErrorPane /* = false */)
     1168{
     1169    /* Sanity check, this method is for machine or group of machine items: */
     1170    if (!isMachineItemSelected() && !isGroupItemSelected())
     1171        return;
     1172
    11711173    /* Get current item: */
    11721174    UIVirtualMachineItem *pItem = currentItem();
     
    11791181        if (m_pPaneToolsMachine->currentTool() == UIToolType_Error)
    11801182            sltHandleToolsPaneIndexChange();
    1181     }
    1182     else
    1183     {
    1184         /* If we were not asked separately: */
    1185         if (!fDontRaiseErrorPane)
    1186         {
    1187             /* Make sure Error pane raised: */
     1183
     1184        /* Propagate current items to the Tools pane: */
     1185        m_pPaneToolsMachine->setItems(currentItems());
     1186    }
     1187    /* Otherwise if we were not asked separately to calm down: */
     1188    else if (!fDontRaiseErrorPane)
     1189    {
     1190        /* Make sure Error pane raised: */
     1191        if (m_pPaneToolsMachine->currentTool() != UIToolType_Error)
    11881192            m_pPaneToolsMachine->openTool(UIToolType_Error);
    11891193
    1190             /* Propagate last access error to update the Error-pane (if machine selected but inaccessible): */
    1191             if (pItem)
    1192                 m_pPaneToolsMachine->setErrorDetails(pItem->accessError());
    1193         }
    1194     }
    1195 
    1196     /* Propagate current items to update the Details-pane: */
    1197     m_pPaneToolsMachine->setItems(currentItems());
    1198 }
     1194        /* Propagate last access error to the Error-pane: */
     1195        if (pItem)
     1196            m_pPaneToolsMachine->setErrorDetails(pItem->accessError());
     1197    }
     1198}
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.h

    r102322 r102422  
    303303
    304304        /** Handles signal about Chooser-pane selection invalidated. */
    305         void sltHandleChooserPaneSelectionInvalidated() { recacheCurrentItemInformation(true /* fDontRaiseErrorPane */); }
     305        void sltHandleChooserPaneSelectionInvalidated() { recacheCurrentMachineItemInformation(true /* fDontRaiseErrorPane */); }
    306306
    307307        /** Handles sliding animation complete signal.
     
    358358        void updateToolsMenuMachine(UIVirtualMachineItem *pItem);
    359359
    360         /** Recaches current item information.
     360        /** Recaches current machine item information.
    361361          * @param  fDontRaiseErrorPane  Brings whether we should not raise error-pane. */
    362         void recacheCurrentItemInformation(bool fDontRaiseErrorPane = false);
     362        void recacheCurrentMachineItemInformation(bool fDontRaiseErrorPane = false);
    363363    /** @} */
    364364
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