Index: trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp	(revision 45272)
+++ trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp	(revision 45273)
@@ -895,4 +895,8 @@
     updateNavigation();
     updateLayout();
+
+    /* Make sure at least one item selected after that: */
+    if (!currentItem() && !navigationList().isEmpty())
+        setCurrentItem(navigationList().first());
 
     /* Notify listeners about selection change: */
@@ -1955,33 +1959,8 @@
 }
 
-void UIGroupDefinitionSaveThread::sltHandleError(UIGroupsSavingError errorType, const CMachine &machine)
-{
-    switch (errorType)
-    {
-        case UIGroupsSavingError_MachineLockFailed:
-            msgCenter().cannotOpenSession(machine);
-            break;
-        case UIGroupsSavingError_MachineGroupSetFailed:
-            msgCenter().cannotSetGroups(machine);
-            break;
-        case UIGroupsSavingError_MachineSettingsSaveFailed:
-            msgCenter().cannotSaveMachineSettings(machine);
-            break;
-        default:
-            break;
-    }
-    emit sigReload(machine.GetId());
-    m_condition.wakeAll();
-}
-
 UIGroupDefinitionSaveThread::UIGroupDefinitionSaveThread()
 {
     /* Assign instance: */
     m_spInstance = this;
-
-    /* Setup connections: */
-    qRegisterMetaType<UIGroupsSavingError>();
-    connect(this, SIGNAL(sigError(UIGroupsSavingError, const CMachine&)),
-            this, SLOT(sltHandleError(UIGroupsSavingError, const CMachine&)));
 }
 
@@ -1997,7 +1976,4 @@
 void UIGroupDefinitionSaveThread::run()
 {
-    /* Lock other thread mutex: */
-    m_mutex.lock();
-
     /* COM prepare: */
     COMBase::InitializeCOM(false);
@@ -2015,25 +1991,20 @@
         if (newGroupSet != oldGroupSet)
         {
-            /* Create new session instance: */
-            CSession session;
-            session.createInstance(CLSID_Session);
-            AssertMsg(!session.isNull(), ("Session instance creation failed!"));
-            /* Search for the corresponding machine: */
-            CMachine machineToLock = vboxGlobal().virtualBox().FindMachine(strId);
-            AssertMsg(!machineToLock.isNull(), ("Machine not found!"));
-
-            /* Lock machine: */
-            machineToLock.LockMachine(session, KLockType_Write);
-            if (!machineToLock.isOk())
+            /* Open session to modify iterated machine: */
+            CSession session = vboxGlobal().openSession(strId);
+            if (session.isNull())
             {
-                emit sigError(UIGroupsSavingError_MachineLockFailed, machineToLock);
-                m_condition.wait(&m_mutex);
-                session.detach();
+                emit sigReload(strId);
                 continue;
             }
 
-            /* Get session's machine: */
+            /* Get session machine: */
             CMachine machine = session.GetMachine();
-            AssertMsg(!machine.isNull(), ("Machine is null!"));
+            AssertMsg(!machine.isNull(), ("Session machine is NULL!"));
+            if (machine.isNull())
+            {
+                emit sigReload(strId);
+                continue;
+            }
 
             /* Set groups: */
@@ -2041,7 +2012,6 @@
             if (!machine.isOk())
             {
-                emit sigError(UIGroupsSavingError_MachineGroupSetFailed, machine);
-                m_condition.wait(&m_mutex);
-                session.UnlockMachine();
+                msgCenter().cannotSetGroups(machine);
+                emit sigReload(strId);
                 continue;
             }
@@ -2051,11 +2021,10 @@
             if (!machine.isOk())
             {
-                emit sigError(UIGroupsSavingError_MachineSettingsSaveFailed, machine);
-                m_condition.wait(&m_mutex);
-                session.UnlockMachine();
+                msgCenter().cannotSaveMachineSettings(machine);
+                emit sigReload(strId);
                 continue;
             }
 
-            /* Close the session: */
+            /* Close the session finally: */
             session.UnlockMachine();
         }
@@ -2067,7 +2036,4 @@
     /* COM cleanup: */
     COMBase::CleanupCOM();
-
-    /* Unlock other thread mutex: */
-    m_mutex.unlock();
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.h	(revision 45272)
+++ trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.h	(revision 45273)
@@ -26,6 +26,4 @@
 #include <QMap>
 #include <QThread>
-#include <QMutex>
-#include <QWaitCondition>
 
 /* GUI includes: */
@@ -301,13 +299,4 @@
 };
 
-/* Represents group definitions save error types: */
-enum UIGroupsSavingError
-{
-    UIGroupsSavingError_MachineLockFailed,
-    UIGroupsSavingError_MachineGroupSetFailed,
-    UIGroupsSavingError_MachineSettingsSaveFailed
-};
-Q_DECLARE_METATYPE(UIGroupsSavingError);
-
 /* Allows to save group definitions asynchronously: */
 class UIGroupDefinitionSaveThread : public QThread
@@ -317,8 +306,5 @@
 signals:
 
-    /* Notifier: Error stuff: */
-    void sigError(UIGroupsSavingError errorType, const CMachine &machine);
-
-    /* Notifier: */
+    /* Notifier: Reload stuff: */
     void sigReload(QString strId);
 
@@ -338,9 +324,4 @@
                    const QMap<QString, QStringList> &newLists);
 
-private slots:
-
-    /* Handler: Error stuff: */
-    void sltHandleError(UIGroupsSavingError errorType, const CMachine &machine);
-
 private:
 
@@ -356,6 +337,4 @@
     QMap<QString, QStringList> m_oldLists;
     QMap<QString, QStringList> m_newLists;
-    QMutex m_mutex;
-    QWaitCondition m_condition;
 };
 
