Index: /trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp	(revision 33905)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp	(revision 33906)
@@ -634,4 +634,20 @@
      */
     mDisableStaticControls = aDisableStaticControls;
+
+    /* How many adapters to display */
+    ulong uCount = qMin((ULONG)4, vboxGlobal().virtualBox().GetSystemProperties().GetNetworkAdapterCount());
+    /* Add the tab pages to parent tab widget. Needed for space calculations. */
+    for (ulong iSlot = 0; iSlot < uCount; ++iSlot)
+    {
+        /* Creating adapter's page: */
+        UIMachineSettingsNetwork *pPage = new UIMachineSettingsNetwork(this, mDisableStaticControls);
+
+        /* Attach adapter's page to Tab Widget: */
+        mTwAdapters->addTab(pPage, pPage->pageTitle());
+
+        /* Disable tab page of disabled adapter if it is being configured dynamically: */
+        if (mDisableStaticControls && !m_cache.m_items[iSlot].m_fAdapterEnabled)
+            mTwAdapters->setTabEnabled(iSlot, false);
+    }
 }
 
@@ -823,15 +839,13 @@
     QWidget *pLastFocusWidget = mTwAdapters->focusProxy();
 
-    /* Apply internal variables data to QWidget(s): */
-    for (int iSlot = 0; iSlot < m_cache.m_items.size(); ++iSlot)
-    {
-        /* Creating adapter's page: */
-        UIMachineSettingsNetwork *pPage = new UIMachineSettingsNetwork(this, mDisableStaticControls);
+    int uCount = qMin(mTwAdapters->count(), m_cache.m_items.size());
+    for (int iSlot = 0; iSlot < uCount; ++iSlot)
+    {
+        UIMachineSettingsNetwork *pPage =
+            qobject_cast<UIMachineSettingsNetwork *>(mTwAdapters->widget(iSlot));
+        Assert(pPage);
 
         /* Loading adapter's data into page: */
         pPage->fetchAdapterData(m_cache.m_items[iSlot]);
-
-        /* Attach adapter's page to Tab Widget: */
-        mTwAdapters->addTab(pPage, pPage->pageTitle());
 
         /* Disable tab page of disabled adapter if it is being configured dynamically: */
