Index: /trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsModel.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsModel.cpp	(revision 88539)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsModel.cpp	(revision 88540)
@@ -74,6 +74,6 @@
 void UIToolsModel::init()
 {
-    /* Load last selected item: */
-    loadLastSelectedItems();
+    /* Load settings: */
+    loadSettings();
 
     /* Update linked values: */
@@ -218,4 +218,10 @@
             default: break;
         }
+
+        /* Save selected items data: */
+        const QList<UIToolType> set = QList<UIToolType>() << m_pLastItemGlobal->itemType() << m_pLastItemMachine->itemType();
+        LogRel2(("GUI: UIToolsModel: Saving tool items as: Global=%d, Machine=%d\n",
+                 (int)m_pLastItemGlobal->itemType(), (int)m_pLastItemMachine->itemType()));
+        gEDataManager->setToolsPaneLastItemsChosen(set);
     }
     /* Otherwise reset current item: */
@@ -556,13 +562,18 @@
 }
 
-void UIToolsModel::loadLastSelectedItems()
+void UIToolsModel::loadSettings()
 {
     /* Load selected items data: */
     const QList<UIToolType> data = gEDataManager->toolsPaneLastItemsChosen();
-
-    /* First of them is current global class item definition: */
     UIToolType enmTypeGlobal = data.value(0);
     if (!UIToolStuff::isTypeOfClass(enmTypeGlobal, UIToolClass_Global))
         enmTypeGlobal = UIToolType_Welcome;
+    UIToolType enmTypeMachine = data.value(1);
+    if (!UIToolStuff::isTypeOfClass(enmTypeMachine, UIToolClass_Machine))
+        enmTypeMachine = UIToolType_Details;
+    LogRel2(("GUI: UIToolsModel: Restoring tool items as: Global=%d, Machine=%d\n",
+             (int)enmTypeGlobal, (int)enmTypeMachine));
+
+    /* First of them is current global class item definition: */
     foreach (UIToolsItem *pItem, items())
         if (pItem->itemType() == enmTypeGlobal)
@@ -572,7 +583,4 @@
 
     /* Second of them is current machine class item definition: */
-    UIToolType enmTypeMachine = data.value(1);
-    if (!UIToolStuff::isTypeOfClass(enmTypeMachine, UIToolClass_Machine))
-        enmTypeMachine = UIToolType_Details;
     foreach (UIToolsItem *pItem, items())
         if (pItem->itemType() == enmTypeMachine)
@@ -582,13 +590,4 @@
 }
 
-void UIToolsModel::saveLastSelectedItems()
-{
-    /* Prepare selected items data: */
-    const QList<UIToolType> set = QList<UIToolType>() << m_pLastItemGlobal->itemType() << m_pLastItemMachine->itemType();
-
-    /* Save selected items data: */
-    gEDataManager->setToolsPaneLastItemsChosen(set);
-}
-
 void UIToolsModel::cleanupConnections()
 {
@@ -623,6 +622,4 @@
 void UIToolsModel::cleanup()
 {
-    /* Save last selected item: */
-    saveLastSelectedItems();
     /* Cleanup connections: */
     cleanupConnections();
Index: /trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsModel.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsModel.h	(revision 88539)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsModel.h	(revision 88540)
@@ -223,9 +223,7 @@
         /** Prepares connections. */
         void prepareConnections();
-        /** Loads last selected items. */
-        void loadLastSelectedItems();
-
-        /** Saves last selected items. */
-        void saveLastSelectedItems();
+        /** Loads settings. */
+        void loadSettings();
+
         /** Cleanups connections. */
         void cleanupConnections();
