Index: trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp	(revision 86622)
+++ trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp	(revision 86629)
@@ -708,7 +708,7 @@
     /* Prepare arrays: */
     QMap<QUuid, bool> verdicts;
-    QList<UIChooserItemMachine*> itemsToRemove;
+    QList<UIChooserItemMachine*> localMachineItemsToRemove;
     QList<CMachine> localMachinesToUnregister;
-    QList<CCloudMachine> cloudMachinesToUnregister;
+    QList<UIChooserItemMachine*> cloudMachineItemsToUnregister;
 
     /* For each selected machine-item: */
@@ -724,5 +724,5 @@
             /* To remove similar machine items? */
             if (!verdicts.value(uId))
-                itemsToRemove << pMachineItem;
+                localMachineItemsToRemove << pMachineItem;
             continue;
         }
@@ -754,19 +754,19 @@
                 localMachinesToUnregister.append(pMachineItem->cache()->toLocal()->machine());
             else if (pMachineItem->cacheType() == UIVirtualMachineItemType_CloudReal)
-                cloudMachinesToUnregister.append(pMachineItem->cache()->toCloud()->machine());
+                cloudMachineItemsToUnregister.append(pMachineItem);
         }
         else
-            itemsToRemove << pMachineItem;
+            localMachineItemsToRemove << pMachineItem;
     }
 
     /* If we have something to remove: */
-    if (!itemsToRemove.isEmpty())
-        removeItems(itemsToRemove);
+    if (!localMachineItemsToRemove.isEmpty())
+        removeLocalMachineItems(localMachineItemsToRemove);
     /* If we have something local to unregister: */
     if (!localMachinesToUnregister.isEmpty())
         unregisterLocalMachines(localMachinesToUnregister);
     /* If we have something cloud to unregister: */
-    if (!cloudMachinesToUnregister.isEmpty())
-        unregisterCloudMachines(cloudMachinesToUnregister);
+    if (!cloudMachineItemsToUnregister.isEmpty())
+        unregisterCloudMachineItems(cloudMachineItemsToUnregister);
 }
 
@@ -1686,5 +1686,5 @@
 }
 
-void UIChooserModel::removeItems(const QList<UIChooserItemMachine*> &machineItems)
+void UIChooserModel::removeLocalMachineItems(const QList<UIChooserItemMachine*> &machineItems)
 {
     /* Confirm machine-items removal: */
@@ -1763,6 +1763,11 @@
 }
 
-void UIChooserModel::unregisterCloudMachines(const QList<CCloudMachine> &machines)
-{
+void UIChooserModel::unregisterCloudMachineItems(const QList<UIChooserItemMachine*> &machineItems)
+{
+    /* Compose a list of machines: */
+    QList<CCloudMachine> machines;
+    foreach (UIChooserItemMachine *pMachineItem, machineItems)
+        machines << pMachineItem->cache()->toCloud()->machine();
+
     /* Confirm machine removal: */
     const int iResultCode = msgCenter().confirmCloudMachineRemoval(machines);
@@ -1770,15 +1775,11 @@
         return;
 
-    /* For every selected machine: */
-    foreach (CCloudMachine comMachine, machines)
-    {
-        /* Remember machine ID: */
-        const QUuid uId = comMachine.GetId();
-        if (!comMachine.isOk())
-        {
-            msgCenter().cannotAcquireCloudMachineParameter(comMachine);
-            continue;
-        }
-
+    /* For every selected machine-item: */
+    typedef QPair<QString, QString> UICloudAccount;
+    QSet<UICloudAccount> changedAccounts;
+    foreach (UIChooserItemMachine *pMachineItem, machineItems)
+    {
+        /* Acquire cloud machine: */
+        CCloudMachine comMachine = pMachineItem->cache()->toCloud()->machine();
         CProgress comProgress;
         /* Prepare remove progress: */
@@ -1793,5 +1794,4 @@
             continue;
         }
-
         /* And show unregister progress finally: */
         msgCenter().showModalProgressDialog(comProgress, comMachine.GetName(), ":/progress_delete_90px.png", 0, 0);
@@ -1801,20 +1801,20 @@
             continue;
         }
-
-        // WORKAROUND:
-        // Hehey! Now we have to remove deleted VM nodes and then update tree for the main root node
-        // ourselves cause there is no corresponding event yet. So we are calling actual handler to do that.
-        UIChooserItem *pItem = root()->searchForItem(uId.toString(),
-                                                     UIChooserItemSearchFlag_Machine |
-                                                     UIChooserItemSearchFlag_ExactId);
-        AssertPtrReturnVoid(pItem);
-        AssertReturnVoid(pItem->node()->toMachineNode()->cacheType() == UIVirtualMachineItemType_CloudReal);
-        AssertPtrReturnVoid(pItem->parentItem());
-        AssertPtrReturnVoid(pItem->parentItem()->parentItem());
-        const QString strProviderShortName = pItem->parentItem()->parentItem()->name();
-        const QString strProfileName = pItem->parentItem()->name();
-        sltCloudMachineUnregistered(strProviderShortName,
-                                    strProfileName,
-                                    uId /* machine ID */);
+        /* Compose cloud account to update: */
+        const QString strProviderShortName = pMachineItem->parentItem()->parentItem()->name();
+        const QString strProfileName = pMachineItem->parentItem()->name();
+        const UICloudAccount account = qMakePair(strProviderShortName, strProfileName);
+        if (!changedAccounts.contains(account))
+            changedAccounts.insert(account);
+    }
+
+    /* Restart list cloud machines task for required accounts: */
+    foreach (const UICloudAccount &account, changedAccounts)
+    {
+        UITaskCloudListMachines *pTask = new UITaskCloudListMachines(account.first /* short provider name */,
+                                                                     account.second /* profile name */,
+                                                                     false /* with refresh? */);
+        AssertPtrReturnVoid(pTask);
+        uiCommon().threadPoolCloud()->enqueueTask(pTask);
     }
 }
Index: trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.h	(revision 86622)
+++ trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.h	(revision 86629)
@@ -379,10 +379,10 @@
         void updateTreeForMainRoot();
 
-        /** Removes @a machineItems. */
-        void removeItems(const QList<UIChooserItemMachine*> &machineItems);
+        /** Removes a list of local virtual @a machineItems. */
+        void removeLocalMachineItems(const QList<UIChooserItemMachine*> &machineItems);
         /** Unregisters a list of local virtual @a machines. */
         void unregisterLocalMachines(const QList<CMachine> &machines);
-        /** Unregisters a list of cloud virtual @a machines. */
-        void unregisterCloudMachines(const QList<CCloudMachine> &machines);
+        /** Unregisters a list of cloud virtual @a machineItems. */
+        void unregisterCloudMachineItems(const QList<UIChooserItemMachine*> &machineItems);
 
         /** Processes drag move @a pEvent. */
