Index: panels.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/panels/panels.module,v
retrieving revision 1.10.4.106
diff -u -r1.10.4.106 panels.module
--- panels.module	30 May 2008 00:23:09 -0000	1.10.4.106
+++ panels.module	2 Jun 2008 19:24:45 -0000
@@ -859,8 +859,12 @@
     $id = 'new-' . ++$counter;
     $output .= $prefix . '$pane = new stdClass()'  . ";\n";
     $output .= $prefix . '  $pane->pid = \'' . $id . '\'' . ";\n";
-    $fields = array('panel', 'type', 'subtype', 'access', 'configuration');
+    $fields = array('panel', 'type', 'subtype', 'access', 'configuration', 'shown', 'visibility');
     foreach ($fields as $field) {
+      //Old panels may not have shown property, so enable by default when re-exporting.
+      if ($field == 'shown' && !isset($pane->shown)) {
+        $pane->shown = TRUE;
+      }
       $output .= $prefix . '  $pane->' . $field . ' = ' . panels_var_export($pane->$field, "$prefix  ") . ";\n";
     }
     $output .= $prefix . '$display->content[\'' . $id . '\'] = $pane' . ";\n";
@@ -999,7 +1003,7 @@
   foreach ($display->content as $pid => $pane) {
     // TODO Really ought to design a method for creating a quick-access set of content_type (and other plugin) data to help optimize render performance
     // If the user can't see this pane, do not render it.
-    if (!$pane->shown || !panels_pane_access($pane, $display)) {
+    if (!panels_pane_shown($pane) || !panels_pane_access($pane, $display)) {
       continue;
     }
 
@@ -1096,6 +1100,15 @@
 }
 
 /**
+ * Determine whether a pane should be shown.
+ * If shown is not set, the pane was probably imported from an old panel,
+ * and should be set to TRUE by default.
+ */
+function panels_pane_shown($pane) {
+   return !isset($pane->shown) || $pane->shown;
+}
+
+/**
  * Given a display and the id of a panel, get the style in which to render
  * that panel.
  */
Index: includes/display_edit.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/panels/includes/Attic/display_edit.inc,v
retrieving revision 1.1.2.50
diff -u -r1.1.2.50 display_edit.inc
--- includes/display_edit.inc	2 Jun 2008 16:39:07 -0000	1.1.2.50
+++ includes/display_edit.inc	2 Jun 2008 19:24:45 -0000
@@ -117,7 +117,8 @@
       if ($caches && user_access('use panels caching features')) {
         $form['button'][$pid]['cache'] = panels_add_button('icon-cache.png', t('Caching'), t('Control caching'), 'pane-cache');
       }
-      $form['button'][$pid]['show_hide'] = panels_add_button($pane->shown ? 'icon-hidepane.png' : 'icon-showpane.png', t('Show/Hide Toggle'), $pane->shown ? t('Hide this pane') : t('Show this pane'), 'pane-toggle-shown');
+      $pane_shown = panels_pane_shown($pane);
+      $form['button'][$pid]['show_hide'] = panels_add_button($pane_shown ? 'icon-hidepane.png' : 'icon-showpane.png', t('Show/Hide Toggle'), $pane_shown ? t('Hide this pane') : t('Show this pane'), 'pane-toggle-shown');
       $form['button'][$pid]['configure'] = panels_add_button('icon-configure.png', t('Configure'), t('Configure this pane'), 'pane-configure');
       $form['button'][$pid]['delete'] = panels_add_button('icon-delete.png', t('Delete'), t('Remove this pane'), 'pane-delete');
     }
@@ -641,7 +642,7 @@
 
   $output = theme('panels_pane_dnd', $block, $pane->pid, empty($content_type) ? panels_get_pane_title($pane, $display->context) : $block->title, $left_buttons, $buttons);
   if ($skin) {
-    $class = 'panel-pane' . ($pane->shown ? '' : ' hidden-pane');
+    $class = 'panel-pane' . (panels_pane_shown($pane) ? '' : ' hidden-pane');
     $output = '<div class="' . $class . '" id="panel-pane-' . $pane->pid . '">' . $output . '</div>';
   }
   return $output;
@@ -850,10 +851,10 @@
     list($ajax_vars->type, $ajax_vars->id, $ajax_vars->old_op) = array('toggle-shown', $pid, drupal_strtolower($op));
 
     if ($op == 'Show') {
-      list($cache->display->content[$pid]->shown, $ajax_vars->output, $ajax_vars->new_op) = array(1, 'Hide', 'hide');
+      list(panels_pane_shown($cache->display->content[$pid]), $ajax_vars->output, $ajax_vars->new_op) = array(1, 'Hide', 'hide');
     }
     elseif ($op == 'Hide') {
-      list($cache->display->content[$pid]->shown, $ajax_vars->output, $ajax_vars->new_op) = array(0, 'Show', 'show');
+      list(panels_pane_shown($cache->display->content[$pid]), $ajax_vars->output, $ajax_vars->new_op) = array(0, 'Show', 'show');
     }
     else {
       // bad args, error out.
