VirtualBox

Changeset 86769 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Oct 30, 2020 12:27:58 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9653: VirtualBox Manager: Chooser pane: More strict control over the selected cloud item refresh.

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

Legend:

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

    r86734 r86769  
    10071007        if (pItem->itemType() == UIVirtualMachineItemType_Local)
    10081008            m_pPaneToolsMachine->setMachine(pItem->toLocal()->machine());
    1009         /* Update current cloud machine state: */
    1010         if (pItem->itemType() == UIVirtualMachineItemType_CloudReal)
    1011             pItem->toCloud()->updateInfoAsync(false /* delayed? */);
    10121009    }
    10131010    else
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemMachine.cpp

    r86742 r86769  
    3131#include "UIIconPool.h"
    3232#include "UIVirtualBoxManager.h"
     33#include "UIVirtualMachineItemCloud.h"
    3334#include "UIVirtualMachineItemLocal.h"
    3435
     
    221222}
    222223
     224void UIChooserItemMachine::setSelected(bool fSelected)
     225{
     226    /* Call to base-class: */
     227    UIChooserItem::setSelected(fSelected);
     228
     229    /* Special treatment for real cloud items: */
     230    if (cacheType() == UIVirtualMachineItemType_CloudReal)
     231    {
     232        UIVirtualMachineItemCloud *pCloudMachineItem = cache()->toCloud();
     233        AssertPtrReturnVoid(pCloudMachineItem);
     234        if (fSelected && pCloudMachineItem->accessible())
     235            pCloudMachineItem->updateInfoAsync(false /* delayed? */);
     236        else
     237            pCloudMachineItem->waitForAsyncInfoUpdateFinished();
     238    }
     239}
     240
    223241void UIChooserItemMachine::startEditing()
    224242{
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemMachine.h

    r84625 r86769  
    105105        /** Returns RTTI item type. */
    106106        virtual int type() const /* override */ { return Type; }
     107
     108        /** Defines item as @a fSelected. */
     109        virtual void setSelected(bool fSelected) /* override */;
    107110
    108111        /** Starts item editing. */
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