From 0059f68acbf5ad64c0de176a384b526c66ef5ae5 Mon Sep 17 00:00:00 2001
From: mh17 <mh17>
Date: Thu, 10 Jun 2010 10:25:50 +0000
Subject: [PATCH] fixed empty 3frame columns on startup

---
 src/zmapView/zmapViewRemoteReceive.c               |  4 ++--
 .../items/zmapWindowContainerFeatureSet.c          | 14 +++++++-------
 src/zmapWindow/zmapWindowDraw.c                    |  6 +++---
 src/zmapWindow/zmapWindowDrawFeatures.c            | 10 +++++-----
 4 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/zmapView/zmapViewRemoteReceive.c b/src/zmapView/zmapViewRemoteReceive.c
index 11a2fbc70..97354badd 100755
--- a/src/zmapView/zmapViewRemoteReceive.c
+++ b/src/zmapView/zmapViewRemoteReceive.c
@@ -31,7 +31,7 @@
  * HISTORY:
  * Last edited: Apr 30 13:15 2010 (edgrif)
  * Created: Tue Jul 10 21:02:42 2007 (rds)
- * CVS info:   $Id: zmapViewRemoteReceive.c,v 1.48 2010-06-08 08:31:25 mh17 Exp $
+ * CVS info:   $Id: zmapViewRemoteReceive.c,v 1.49 2010-06-10 10:25:50 mh17 Exp $
  *-------------------------------------------------------------------
  */
 
@@ -1950,7 +1950,7 @@ static void getFeatureNames(ZMapView view, RequestData input_data, ResponseData
 	}
       else
 	{
-	  GHashTable *uniq_features = NULL ;
+	  GHashTable *uniq_features = g_hash_table_new(NULL,NULL) ;
 
 	  g_list_foreach(feature_list, findUniqueCB, &uniq_features) ;
 
diff --git a/src/zmapWindow/items/zmapWindowContainerFeatureSet.c b/src/zmapWindow/items/zmapWindowContainerFeatureSet.c
index 72b3ef9ac..78b23299e 100755
--- a/src/zmapWindow/items/zmapWindowContainerFeatureSet.c
+++ b/src/zmapWindow/items/zmapWindowContainerFeatureSet.c
@@ -29,7 +29,7 @@
  * HISTORY:
  * Last edited: May 21 17:06 2010 (edgrif)
  * Created: Mon Jul 30 13:09:33 2007 (rds)
- * CVS info:   $Id: zmapWindowContainerFeatureSet.c,v 1.29 2010-06-08 08:31:26 mh17 Exp $
+ * CVS info:   $Id: zmapWindowContainerFeatureSet.c,v 1.30 2010-06-10 10:25:50 mh17 Exp $
  *-------------------------------------------------------------------
  */
 #include <string.h>		/* memset */
@@ -212,10 +212,10 @@ ZMapWindowContainerFeatureSet zmapWindowContainerFeatureSetAugment(ZMapWindowCon
 	}
 
       // try to guess the intended visibility mode to avoid extra foo_canvas activity
-      zmapWindowColumnSetState(window, FOO_CANVAS_GROUP(container_set),
-                        ZMAPSTYLE_COLDISPLAY_INVALID, FALSE);
+//      zmapWindowColumnSetState(window, FOO_CANVAS_GROUP(container_set),
+//                        ZMAPSTYLE_COLDISPLAY_INVALID, FALSE);
 
-//      zmapWindowContainerSetVisibility((FooCanvasGroup *)container_set, FALSE);
+      zmapWindowContainerSetVisibility((FooCanvasGroup *)container_set, FALSE);
     }
 
   return container_set;
@@ -1074,7 +1074,7 @@ ZMapWindowContainerFeatureSet zmapWindowContainerFeatureSetDestroy(ZMapWindowCon
 }
 
 
-#if MH17_function_not_used
+
 /* This function is written the wrong way round.  It should be
  * re-written, along with extract_value_from_style_table so that
  * this function is part of utils and extract_value_from_style_table
@@ -1110,7 +1110,7 @@ gboolean zmapWindowStyleListGetSetting(GList *list_of_styles,
 
 	      style = ZMAP_FEATURE_STYLE(list->data);
 	      unique_id = zMapStyleGetUniqueID(style);
-	      extract_value_from_style_table(GINT_TO_POINTER(unique_id), style, &value_data);
+	      extract_value_from_style_table(GINT_TO_POINTER(unique_id), (gpointer) style, &value_data);
 	    }
 	  while((list = g_list_next(list)));
 	}
@@ -1119,7 +1119,7 @@ gboolean zmapWindowStyleListGetSetting(GList *list_of_styles,
   return result;
 }
 
-#endif
+
 
 /*
  *  OBJECT CODE
diff --git a/src/zmapWindow/zmapWindowDraw.c b/src/zmapWindow/zmapWindowDraw.c
index 6a7a4b2d0..1a13d96ef 100755
--- a/src/zmapWindow/zmapWindowDraw.c
+++ b/src/zmapWindow/zmapWindowDraw.c
@@ -30,7 +30,7 @@
  * HISTORY:
  * Last edited: Feb 15 11:52 2010 (edgrif)
  * Created: Thu Sep  8 10:34:49 2005 (edgrif)
- * CVS info:   $Id: zmapWindowDraw.c,v 1.124 2010-06-08 08:31:25 mh17 Exp $
+ * CVS info:   $Id: zmapWindowDraw.c,v 1.125 2010-06-10 10:25:50 mh17 Exp $
  *-------------------------------------------------------------------
  */
 
@@ -256,7 +256,7 @@ void zmapWindowColumnSetState(ZMapWindow window, FooCanvasGroup *column_group,
 {
   ZMapWindowContainerFeatureSet container;
   ZMapStyleColumnDisplayState curr_col_state ;
-  gboolean test_mag = TRUE;
+//  gboolean test_mag = TRUE;
 
   container = (ZMapWindowContainerFeatureSet)column_group;
 
@@ -269,7 +269,7 @@ void zmapWindowColumnSetState(ZMapWindow window, FooCanvasGroup *column_group,
 
       if (!new_col_state)
         {
-          test_mag = FALSE;
+//          test_mag = FALSE;
           // we are creating the column: mag not vis due to no features
           // but we still want it to be visible
           // a bit hacky, but less grief than adding a new flag
diff --git a/src/zmapWindow/zmapWindowDrawFeatures.c b/src/zmapWindow/zmapWindowDrawFeatures.c
index 684b86705..f825f8d97 100755
--- a/src/zmapWindow/zmapWindowDrawFeatures.c
+++ b/src/zmapWindow/zmapWindowDrawFeatures.c
@@ -28,7 +28,7 @@
  * HISTORY:
  * Last edited: Mar 11 14:19 2010 (edgrif)
  * Created: Thu Jul 29 10:45:00 2004 (rnc)
- * CVS info:   $Id: zmapWindowDrawFeatures.c,v 1.273 2010-06-08 08:31:25 mh17 Exp $
+ * CVS info:   $Id: zmapWindowDrawFeatures.c,v 1.274 2010-06-10 10:25:50 mh17 Exp $
  *-------------------------------------------------------------------
  */
 
@@ -1099,11 +1099,11 @@ static void set_name_create_set_columns(gpointer list_data, gpointer user_data)
 		       frame) ;
 
 
-#ifdef ED_G_NEVER_INCLUDE_THIS_CODE
+//#ifdef ED_G_NEVER_INCLUDE_THIS_CODE
       printf("making \"%s\" %s %s column \n",
 	     g_quark_to_string(feature_set_id),
 	     zMapFeatureFrame2Str(frame), zMapFeatureStrand2Str(ZMAPSTRAND_REVERSE)) ;
-#endif /* ED_G_NEVER_INCLUDE_THIS_CODE */
+//#endif /* ED_G_NEVER_INCLUDE_THIS_CODE */
 
       if (canvas_data->curr_reverse_group)
 	produce_column(canvas_data,
@@ -1173,7 +1173,7 @@ static gboolean feature_set_matches_frame_drawing_mode(ZMapWindow     window,
 
       if(window->display_3_frame)
 	{
-#if 0
+#if 1       // mh17: why did i set this to 0?
 	  if(style_list && frame_specific)
 	    {
 	      GValue value = {0};
@@ -1214,7 +1214,7 @@ static gboolean feature_set_matches_frame_drawing_mode(ZMapWindow     window,
     {
       /* mh17: canvas_data ->frame mode == true means draw them
        * window->display_3_frame means we are in the mode
-       * need to set matched false to avoid initial display of sensitive data
+       * need to set matched false to avoid initial display of 3-frame data
        */
       matched = FALSE;
     }
-- 
GitLab