Index: /trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp	(revision 74756)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp	(revision 74757)
@@ -3972,23 +3972,62 @@
 double UIExtraDataManager::scaleFactor(const QString &strID, const int uScreenIndex)
 {
-    /* Get corresponding extra-data value: */
-    const QString strValue = extraDataString(extraDataKeyPerScreen(GUI_ScaleFactor, uScreenIndex), strID);
-
-    /* Try to convert loaded data to double: */
+    /* Get corresponding extra-data: */
+    const QStringList data = extraDataStringList(GUI_ScaleFactor, strID);
+
+    /* 1.0 is default scale factor: */
+    if (data.size() == 0)
+        return 1.0;
+
+    int index = uScreenIndex;
+    /* use the 0th. scale factor in case we dont have a scale factor for @p uScreenIndex: */
+    if (data.size() <= uScreenIndex)
+        index = 0;
+
     bool fOk = false;
-    double dValue = strValue.toDouble(&fOk);
-
-    /* Invent the default value: */
-    if (!fOk || !dValue)
-        dValue = 1;
-
-    /* Return value: */
-    return dValue;
+    double scaleFactor = data[index].toDouble(&fOk);
+    if (!fOk)
+        return 1.0;
+    return scaleFactor;
+}
+
+QList<double> UIExtraDataManager::scaleFactors(const QString &strID)
+{
+    QList<double> scaleFactorList;
+    const QStringList data = extraDataStringList(GUI_ScaleFactor, strID);
+    bool fOk = false;
+    double scaleFactor;
+    for (int i = 0; i < data.size(); ++i)
+    {
+        scaleFactor = data[i].toDouble(&fOk);
+        if (!fOk)
+            scaleFactor = 1.0;
+        scaleFactorList.append(scaleFactor);
+    }
+    return scaleFactorList;
 }
 
 void UIExtraDataManager::setScaleFactor(double dScaleFactor, const QString &strID, const int uScreenIndex)
 {
-    /* Set corresponding extra-data value: */
-    setExtraDataString(extraDataKeyPerScreen(GUI_ScaleFactor, uScreenIndex), QString::number(dScaleFactor), strID);
+    QStringList data = extraDataStringList(GUI_ScaleFactor, strID);
+
+    /* Just make sure that we have corresponding data item: */
+    if (data.size() <= uScreenIndex)
+    {
+        int listSize = data.size();
+        for (int i = listSize; i <= uScreenIndex; ++i)
+            data.append(QString::number(1.0));
+    }
+
+    data[uScreenIndex] = QString::number(dScaleFactor);
+
+    setExtraDataStringList(GUI_ScaleFactor, data, strID);
+}
+
+void UIExtraDataManager::setScaleFactors(const QList<double> &scaleFactors, const QString &strID)
+{
+    QStringList data;
+    for (int i = 0; i < scaleFactors.size(); ++i)
+        data.append(QString::number(scaleFactors[i]));
+    setExtraDataStringList(GUI_ScaleFactor, data, strID);
 }
 
@@ -4527,5 +4566,5 @@
             emit sigStatusBarConfigurationChange(strMachineID);
         /* Scale-factor change: */
-        else if (strKey.contains(GUI_ScaleFactor))
+        else if (strKey ==GUI_ScaleFactor)
             emit sigScaleFactorChange(strMachineID);
         /* Scaling optimization type change: */
Index: /trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h	(revision 74756)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h	(revision 74757)
@@ -598,6 +598,8 @@
         /** Returns the scale-factor. */
         double scaleFactor(const QString &strID, const int uScreenIndex);
+        QList<double> scaleFactors(const QString &strID);
         /** Defines the @a dScaleFactor. */
         void setScaleFactor(double dScaleFactor, const QString &strID, const int uScreenIndex);
+        void setScaleFactors(const QList<double> &scaleFactors, const QString &strID);
 
         /** Returns the scaling optimization type. */
Index: /trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp	(revision 74756)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp	(revision 74757)
@@ -47,5 +47,4 @@
         : m_iCurrentVRAM(0)
         , m_cGuestScreenCount(0)
-        , m_dScaleFactor(1.0)
         , m_f3dAccelerationEnabled(false)
 #ifdef VBOX_WITH_VIDEOHWACCEL
@@ -74,5 +73,4 @@
                && (m_iCurrentVRAM == other.m_iCurrentVRAM)
                && (m_cGuestScreenCount == other.m_cGuestScreenCount)
-               && (m_dScaleFactor == other.m_dScaleFactor)
                && (m_scaleFactors == other.m_scaleFactors)
                && (m_f3dAccelerationEnabled == other.m_f3dAccelerationEnabled)
@@ -245,5 +243,4 @@
     int     m_cGuestScreenCount;
     /** Holds the guest screen scale-factor. */
-    double  m_dScaleFactor;
     QList<double> m_scaleFactors;
     /** Holds whether the 3D acceleration is enabled. */
@@ -364,9 +361,5 @@
     oldDisplayData.m_iCurrentVRAM = m_machine.GetVRAMSize();
     oldDisplayData.m_cGuestScreenCount = m_machine.GetMonitorCount();
-    oldDisplayData.m_dScaleFactor = gEDataManager->scaleFactor(m_machine.GetId(), 0);
-    oldDisplayData.m_scaleFactors.clear();
-    for (unsigned i = 0; i < m_machine.GetMonitorCount(); ++i)
-        oldDisplayData.m_scaleFactors.append(gEDataManager->scaleFactor(m_machine.GetId(), (int)i));
-
+    oldDisplayData.m_scaleFactors = gEDataManager->scaleFactors(m_machine.GetId());
     oldDisplayData.m_f3dAccelerationEnabled = m_machine.GetAccelerate3DEnabled();
 #ifdef VBOX_WITH_VIDEOHWACCEL
@@ -1293,4 +1286,5 @@
     screens.resize(m_pEditorVideoScreenCount->value());
     m_pScrollerVideoCaptureScreens->setValue(screens);
+    m_pScaleFactorEditor->setMonitorCount(m_pEditorVideoScreenCount->value());
 }
 
@@ -1408,11 +1402,7 @@
 
         /* Save guest-screen scale-factor: */
-        if (fSuccess && newDisplayData.m_dScaleFactor != oldDisplayData.m_dScaleFactor)
-            /* fSuccess = */ gEDataManager->setScaleFactor(newDisplayData.m_dScaleFactor, strMachineId, 0);
         if (fSuccess && newDisplayData.m_scaleFactors != oldDisplayData.m_scaleFactors)
         {
-            int listSize = newDisplayData.m_scaleFactors.size();
-            for (int i = 0; i < listSize; ++i)
-                gEDataManager->setScaleFactor(newDisplayData.m_scaleFactors[i], strMachineId, i);
+            gEDataManager->setScaleFactors(newDisplayData.m_scaleFactors, strMachineId);
         }
     }
Index: /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIScaleFactorEditor.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIScaleFactorEditor.cpp	(revision 74756)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIScaleFactorEditor.cpp	(revision 74757)
@@ -56,11 +56,26 @@
 
     m_pMonitorComboBox->blockSignals(true);
-    m_pMonitorComboBox->clear();
-    for (int i = 0; i < iMonitorCount; ++i)
-    {
-        m_pMonitorComboBox->addItem(QString("Monitor %1").arg(i));
-
+    int iCurrentMonitorCount = m_pMonitorComboBox->count();
+    int iCurrentMonitorIndex = m_pMonitorComboBox->currentIndex();
+    //m_pMonitorComboBox->clear();
+    if (iCurrentMonitorCount < iMonitorCount)
+    {
+        for (int i = iCurrentMonitorCount; i < iMonitorCount; ++i)
+        {
+            m_pMonitorComboBox->addItem(QString("Monitor %1").arg(i));
+            /* In case that we have increased the # of monitors add new scale factors to the scale factor cache: */
+            if (i >= m_scaleFactors.size())
+                m_scaleFactors.append(1.0);
+        }
+    }
+    else
+    {
+        for (int i = iCurrentMonitorCount - 1; i >= iMonitorCount; --i)
+            m_pMonitorComboBox->removeItem(i);
     }
     m_pMonitorComboBox->blockSignals(false);
+
+    if (iCurrentMonitorIndex != m_pMonitorComboBox->currentIndex())
+        showMonitorScaleFactor();
 }
 
@@ -69,14 +84,18 @@
     if (m_scaleFactors == scaleFactors)
         return;
-    m_scaleFactors = scaleFactors;
-
-    /* Set the spinbox value for the currently selected monitor: */
-    if (m_pMonitorComboBox)
-    {
-        int currentMonitorIndex = m_pMonitorComboBox->currentIndex();
-        if (m_scaleFactors.size() > currentMonitorIndex && m_pScaleSpinBox)
-            setSpinBoxValue(100 * m_scaleFactors.at(currentMonitorIndex));
-    }
-}
+    /* if m_scaleFactors has more items than @p scaleFactors than we keep the additional items
+       this can happen for example when extra data has 4 scale factor while machine has 5 monitors: */
+    if (m_scaleFactors.size() > scaleFactors.size())
+    {
+        for (int i = 0; i < scaleFactors.size(); ++i)
+            m_scaleFactors[i] = scaleFactors[i];
+    }
+    else
+    {
+        m_scaleFactors = scaleFactors;
+    }
+    showMonitorScaleFactor();
+}
+
 
 const QList<double>& UIScaleFactorEditor::scaleFactors() const
@@ -212,2 +231,16 @@
     }
 }
+
+void UIScaleFactorEditor::showMonitorScaleFactor()
+{
+    /* Set the spinbox value for the currently selected monitor: */
+    if (m_pMonitorComboBox)
+    {
+        int currentMonitorIndex = m_pMonitorComboBox->currentIndex();
+        if (m_scaleFactors.size() > currentMonitorIndex && m_pScaleSpinBox)
+        {
+            setSpinBoxValue(100 * m_scaleFactors.at(currentMonitorIndex));
+            setSliderValue(100 * m_scaleFactors.at(currentMonitorIndex));
+        }
+    }
+}
Index: /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIScaleFactorEditor.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIScaleFactorEditor.h	(revision 74756)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIScaleFactorEditor.h	(revision 74757)
@@ -61,10 +61,12 @@
 private:
 
-    void prepare();
-    void setScaleFactor(int iMonitorIndex, int iScaleFactor);
+    void               prepare();
+    void               setScaleFactor(int iMonitorIndex, int iScaleFactor);
     /* Blocks slider's signals before settting the value. */
-    void setSliderValue(int iValue);
+    void               setSliderValue(int iValue);
     /* Blocks slider's signals before settting the value. */
-    void setSpinBoxValue(int iValue);
+    void               setSpinBoxValue(int iValue);
+    /* Set the spinbox and slider to scale factor of currently selected monitor */
+    void               showMonitorScaleFactor();
     QSpinBox          *m_pScaleSpinBox;
     QGridLayout       *m_pMainLayout;
