Index: taxonomy_super_select.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/taxonomy_super_select/taxonomy_super_select.module,v
retrieving revision 1.10.2.1
diff -u -p -r1.10.2.1 taxonomy_super_select.module
--- taxonomy_super_select.module	21 Jan 2009 22:44:21 -0000	1.10.2.1
+++ taxonomy_super_select.module	2 Oct 2010 06:58:42 -0000
@@ -122,15 +122,21 @@ function taxonomy_super_select_form_alte
 function _tss_next_nested(&$terms, &$vid, &$input, $tss, &$form_node, &$form_branch) {
   $fieldweight = 0;
   foreach ($terms as $index => $term) {
-    $child = taxonomy_get_children($term->tid, $vid);
-    if (count($child)) {
+    $children = taxonomy_get_children($term->tid, $vid);
+    if (count($children)) {
       if ($tss[$vid]['parents']) {
         $term->is_parent = TRUE;
         $term->parent_type  = $input;
         $term->parent_value = $form_node->taxonomy[$term->tid]->tid;
       }
       $form_branch[$term->tid] = _tss_branch($vid, $term, NULL, 'fieldset', ++$fieldweight);
-      _tss_next_nested($child, $vid, $input, $tss, $form_node, $form_branch[$term->tid]);
+      _tss_next_nested($children, $vid, $input, $tss, $form_node, $form_branch[$term->tid]);
+      // if any of the children is selected, then the parent is not selected
+      foreach ($children as $child) {
+        if ($form_node->taxonomy[$child->tid]->tid) {
+          $form_branch[$term->tid]['#collapsed'] = FALSE;
+        }
+      }
     }
     else {
       if ($value =  $form_node->taxonomy[$term->tid]->tid) {
@@ -139,6 +145,9 @@ function _tss_next_nested(&$terms, &$vid
       $form_branch[$term->tid] = _tss_branch($vid, $term, $value, $input, $fieldweight++);
     }
   }
+  if ($child_selected) {
+    $form_branch[$term->tid]['#collapsed'] = FALSE;
+  }
 }
 
 function _tss_branch($vid, $term, $value = NULL, $type = 'fieldset', $fieldweight = -1) {
