Index: /trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp	(revision 84566)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp	(revision 84567)
@@ -437,4 +437,24 @@
 }
 
+void UIChooserModel::makeSureNoItemWithCertainIdIsSelected(const QUuid &uId)
+{
+    /* Look for all nodes with passed uId: */
+    QList<UIChooserNode*> matchedNodes;
+    invisibleRoot()->searchForNodes(uId.toString(),
+                                    UIChooserItemSearchFlag_Machine |
+                                    UIChooserItemSearchFlag_ExactId,
+                                    matchedNodes);
+
+    /* Compose a set of items with passed uId: */
+    QSet<UIChooserItem*> matchedItems;
+    foreach (UIChooserNode *pNode, matchedNodes)
+        if (pNode && pNode->item())
+            matchedItems << pNode->item();
+
+    /* If we have at least one of those items currently selected: */
+    if (selectedItems().toSet().intersects(matchedItems))
+        setSelectedItem(findClosestUnselectedItem());
+}
+
 void UIChooserModel::setCurrentItem(UIChooserItem *pItem)
 {
@@ -1049,4 +1069,8 @@
 void UIChooserModel::sltLocalMachineRegistered(const QUuid &uId, const bool fRegistered)
 {
+    /* Make sure no item with passed uId is selected: */
+    if (!fRegistered)
+        makeSureNoItemWithCertainIdIsSelected(uId);
+
     /* Call to base-class: */
     UIChooserAbstractModel::sltLocalMachineRegistered(uId, fRegistered);
@@ -1078,4 +1102,8 @@
                                                const QUuid &uId, const bool fRegistered)
 {
+    /* Make sure no item with passed uId is selected: */
+    if (!fRegistered)
+        makeSureNoItemWithCertainIdIsSelected(uId);
+
     /* Call to base-class: */
     UIChooserAbstractModel::sltCloudMachineRegistered(strProviderName, strProfileName, uId, fRegistered);
@@ -1598,7 +1626,4 @@
         return;
 
-    /* Change selection to some close by item: */
-    setSelectedItem(findClosestUnselectedItem());
-
     /* For every selected machine: */
     foreach (CMachine comMachine, machines)
@@ -1653,7 +1678,4 @@
     if (iResultCode == AlertButton_Cancel)
         return;
-
-    /* Change selection to some close by item: */
-    setSelectedItem(findClosestUnselectedItem());
 
     /* For every selected machine: */
Index: /trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.h	(revision 84566)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.h	(revision 84567)
@@ -180,4 +180,6 @@
         /** Finds closest non-selected-item. */
         UIChooserItem *findClosestUnselectedItem() const;
+        /** Makes sure selection doesn't contain item with certain @a uId. */
+        void makeSureNoItemWithCertainIdIsSelected(const QUuid &uId);
 
         /** Defines current @a pItem. */
