Index: /trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.cpp	(revision 43776)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.cpp	(revision 43777)
@@ -40,15 +40,7 @@
 
 UIGChooserItemGroup::UIGChooserItemGroup(QGraphicsScene *pScene)
-    : UIGChooserItem(0, false)
+    : UIGChooserItem(0, false /* temporary? */)
     , m_fClosed(false)
-    , m_pToggleButton(0)
-    , m_pEnterButton(0)
-    , m_pExitButton(0)
-    , m_pNameEditorWidget(0)
-    , m_pNameEditor(0)
-    , m_iAdditionalHeight(0)
-    , m_iCornerRadius(10)
     , m_fMainRoot(true)
-    , m_iBlackoutDarkness(110)
 {
     /* Prepare: */
@@ -66,16 +58,8 @@
                                          UIGChooserItemGroup *pCopyFrom,
                                          bool fMainRoot)
-    : UIGChooserItem(0, true)
+    : UIGChooserItem(0, true /* temporary? */)
     , m_strName(pCopyFrom->name())
     , m_fClosed(pCopyFrom->closed())
-    , m_pToggleButton(0)
-    , m_pEnterButton(0)
-    , m_pExitButton(0)
-    , m_pNameEditorWidget(0)
-    , m_pNameEditor(0)
-    , m_iAdditionalHeight(0)
-    , m_iCornerRadius(10)
     , m_fMainRoot(fMainRoot)
-    , m_iBlackoutDarkness(110)
 {
     /* Prepare: */
@@ -100,13 +84,5 @@
     , m_strName(strName)
     , m_fClosed(!fOpened)
-    , m_pToggleButton(0)
-    , m_pEnterButton(0)
-    , m_pExitButton(0)
-    , m_pNameEditorWidget(0)
-    , m_pNameEditor(0)
-    , m_iAdditionalHeight(0)
-    , m_iCornerRadius(10)
     , m_fMainRoot(false)
-    , m_iBlackoutDarkness(110)
 {
     /* Prepare: */
@@ -130,13 +106,5 @@
     , m_strName(pCopyFrom->name())
     , m_fClosed(pCopyFrom->closed())
-    , m_pToggleButton(0)
-    , m_pEnterButton(0)
-    , m_pExitButton(0)
-    , m_pNameEditorWidget(0)
-    , m_pNameEditor(0)
-    , m_iAdditionalHeight(0)
-    , m_iCornerRadius(10)
     , m_fMainRoot(false)
-    , m_iBlackoutDarkness(110)
 {
     /* Prepare: */
@@ -168,5 +136,5 @@
         model()->setFocusItem(0);
     }
-    /* If that item is selected: */
+    /* If that item is in selection list: */
     if (model()->currentItems().contains(this))
     {
@@ -174,6 +142,10 @@
         model()->removeFromCurrentItems(this);
     }
-    /* Remove item from the navigation list: */
-    model()->removeFromNavigationList(this);
+    /* If that item is in navigation list: */
+    if (model()->navigationList().contains(this))
+    {
+        /* Remove item from the navigation list: */
+        model()->removeFromNavigationList(this);
+    }
 
     /* Remove item from the parent: */
@@ -232,5 +204,5 @@
 }
 
-bool UIGChooserItemGroup::contains(const QString &strId, bool fRecursively /* = false */) const
+bool UIGChooserItemGroup::contains(const QString &strId) const
 {
     /* Check machine items: */
@@ -238,9 +210,4 @@
         if (pItem->toMachineItem()->id() == strId)
             return true;
-    /* If recursively => check group items: */
-    if (fRecursively)
-        foreach (UIGChooserItem *pItem, m_groupItems)
-            if (pItem->toGroupItem()->contains(strId, fRecursively))
-                return true;
     return false;
 }
@@ -520,4 +487,16 @@
 void UIGChooserItemGroup::prepare()
 {
+    /* Buttons: */
+    m_pToggleButton = 0;
+    m_pEnterButton = 0;
+    m_pExitButton = 0;
+    /* Name editor: */
+    m_pNameEditorWidget = 0;
+    m_pNameEditor = 0;
+    /* Painting stuff: */
+    m_iAdditionalHeight = 0;
+    m_iCornerRadius = 10;
+    m_iBlackoutDarkness = 110;
+
     /* Non root item only: */
     if (!isRoot())
Index: /trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.h	(revision 43776)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.h	(revision 43777)
@@ -56,12 +56,13 @@
     int type() const { return Type; }
 
-    /* Constructor/destructor: */
+    /* Constructor (main-root-item): */
     UIGChooserItemGroup(QGraphicsScene *pScene);
-    UIGChooserItemGroup(QGraphicsScene *pScene, UIGChooserItemGroup *pCopyFrom,
-                        bool fMainRoot);
-    UIGChooserItemGroup(UIGChooserItem *pParent, const QString &strName,
-                        bool fOpened = false, int iPosition  = -1);
-    UIGChooserItemGroup(UIGChooserItem *pParent, UIGChooserItemGroup *pCopyFrom,
-                        int iPosition = -1);
+    /* Constructor (temporary main-root-item/root-item copy): */
+    UIGChooserItemGroup(QGraphicsScene *pScene, UIGChooserItemGroup *pCopyFrom, bool fMainRoot);
+    /* Constructor (new non-root-item): */
+    UIGChooserItemGroup(UIGChooserItem *pParent, const QString &strName, bool fOpened = false, int iPosition  = -1);
+    /* Constructor (new non-root-item copy): */
+    UIGChooserItemGroup(UIGChooserItem *pParent, UIGChooserItemGroup *pCopyFrom, int iPosition = -1);
+    /* Destructor: */
     ~UIGChooserItemGroup();
 
@@ -77,5 +78,5 @@
 
     /* API: Children stuff: */
-    bool contains(const QString &strId, bool fRecursively = false) const;
+    bool contains(const QString &strId) const;
     bool isContainsLockedMachine();
 
