--- themesettingsapi.module	Tue May 27 14:22:29 2008
+++ themesettingsapi_new.module	Tue May 27 15:49:13 2008
@@ -87,10 +87,2 @@
 
-        // Since we are adding more settings, make logo and favicon collapsed
-        if (isset($form['logo'])) {
-          $form['logo']['#collapsed'] = TRUE;
-        }
-        if (isset($form['favicon'])) {
-          $form['favicon']['#collapsed'] = TRUE;
-        }
-
         // Get the theme settings
@@ -106,2 +98,4 @@
           if (!empty($group)) {
+            $collapse_logo = TRUE;
+            
             $form['engine_specific'] = array('#type' => 'fieldset', '#title' => t('Theme-engine-specific settings'), '#description' => t('These settings only exist for all the templates and styles based on the %engine theme engine.', array('%engine' => $themes[$key]->prefix)));
@@ -119,4 +113,15 @@
           if (!empty($group)) {
+            $collapse_logo = TRUE;
+            
             $form['theme_specific'] = array('#type' => 'fieldset', '#title' => t('Theme-specific settings'), '#description' => t('These settings only exist for the %theme theme and all the styles based on it.', array('%theme' => $key)));
             $form['theme_specific'] = array_merge($form['theme_specific'], $group);
+          }
+        }
+        if ($collapse_logo) {
+          // Since we added more settings, make logo and favicon collapsed
+          if (isset($form['logo'])) {
+            $form['logo']['#collapsed'] = TRUE;
+          }
+          if (isset($form['favicon'])) {
+            $form['favicon']['#collapsed'] = TRUE;
           }
