VirtualBox

Changeset 87102 in vbox for trunk


Ignore:
Timestamp:
Dec 17, 2020 2:44:51 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9510: VirtualBox Manager / Chooser pane: Properly handle switching from resources to performance tool (s.a. r141940).

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

Legend:

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

    r87101 r87102  
    510510void UIVirtualBoxManagerWidget::sltSwitchToResourcesPane()
    511511{
     512    AssertPtrReturnVoid(m_pPaneChooser);
    512513    AssertPtrReturnVoid(m_pPaneTools);
    513     m_pPaneToolsGlobal->setActive(true);
    514     switchToGlobalTool(UIToolType_Resources);
     514    m_pPaneChooser->setCurrentGlobal();
    515515    m_pPaneTools->setToolsType(UIToolType_Resources);
    516516}
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.cpp

    r86923 r87102  
    188188    AssertPtrReturnVoid(model());
    189189    model()->setCurrentMachineItem(uId);
     190}
     191
     192void UIChooser::setCurrentGlobal()
     193{
     194    AssertPtrReturnVoid(model());
     195    model()->setCurrentGlobalItem();
    190196}
    191197
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.h

    r86923 r87102  
    172172        /** Changes current machine to the one with certain @a uId. */
    173173        void setCurrentMachine(const QUuid &uId);
     174        /** Set global tools to be the current item. */
     175        void setCurrentGlobal();
    174176    /** @} */
    175177
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp

    r86930 r87102  
    10011001                                                 UIChooserItemSearchFlag_Machine |
    10021002                                                 UIChooserItemSearchFlag_ExactId);
     1003
     1004    /* Select item if exists: */
     1005    if (pItem)
     1006        setSelectedItem(pItem);
     1007}
     1008
     1009void UIChooserModel::setCurrentGlobalItem()
     1010{
     1011    /* Look whether we have such item at all: */
     1012    UIChooserItem *pItem = root()->searchForItem(QString(),
     1013                                                 UIChooserItemSearchFlag_Global);
    10031014
    10041015    /* Select item if exists: */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.h

    r86923 r87102  
    233233        /** Changes current machine item to the one with certain @a uId. */
    234234        void setCurrentMachineItem(const QUuid &uId);
     235        /** Sets global tools item to be the current one. */
     236        void setCurrentGlobalItem();
    235237
    236238        /** Defines current @a pDragObject. */
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