From c93c55705aa0296dec05e0f86a766647feb5797a Mon Sep 17 00:00:00 2001
From: mh17 <mh17>
Date: Mon, 19 Apr 2010 11:45:57 +0000
Subject: [PATCH] fixed to default bump mode

---
 src/include/ZMap/zmapStyle.h | 5 +++--
 src/zmapFeature/zmapStyle.c  | 7 +++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/include/ZMap/zmapStyle.h b/src/include/ZMap/zmapStyle.h
index c55d3e1da..c82bd06d0 100755
--- a/src/include/ZMap/zmapStyle.h
+++ b/src/include/ZMap/zmapStyle.h
@@ -28,7 +28,7 @@
  * HISTORY:
  * Last edited: Jan 26 08:42 2010 (edgrif)
  * Created: Mon Feb 26 09:28:26 2007 (edgrif)
- * CVS info:   $Id: zmapStyle.h,v 1.54 2010-04-19 11:00:39 mh17 Exp $
+ * CVS info:   $Id: zmapStyle.h,v 1.55 2010-04-19 11:45:57 mh17 Exp $
  *-------------------------------------------------------------------
  */
 #ifndef ZMAP_STYLE_H
@@ -331,9 +331,10 @@ _(ZMAPBUMP_NAME,                  , "name",                  "Name",
 _(ZMAPBUMP_NAME_INTERLEAVE,       , "name-interleave",       "Name Interleave",               "All features with same name in a single sub-column but several names interleaved in each sub-column, the most compact display.") \
 _(ZMAPBUMP_NAME_NO_INTERLEAVE,    , "name-no-interleave",    "Name No Interleave",            "Display as for Interleave but no interleaving of different names.") \
 _(ZMAPBUMP_NAME_COLINEAR,         , "name-colinear",         "Name & Colinear", "As for Name but colinear alignments shown.") \
-_(ZMAPBUMP_NAME_INTERLEAVE_COLINEAR,         , "name-colinear-interleave",         "Name Interleave & Colinear", "As for Name & Colinear but interleaved, the most compact display.") \
 _(ZMAPBUMP_NAME_BEST_ENDS,        , "name-best-ends",        "Name and Best 5'& 3' Matches",  "As for No Interleave but for alignments sorted by 5' and 3' best/biggest matches, one sub_column per match.")
 
+//_(ZMAPBUMP_NAME_INTERLEAVE_COLINEAR,         , "name-colinear-interleave",         "Name Interleave & Colinear", "As for Name & Colinear but interleaved, the most compact display.")
+
 
 /* We should do this automatically or not at all..... */
 #define ZMAPBUMP_START ZMAPBUMP_UNBUMP
diff --git a/src/zmapFeature/zmapStyle.c b/src/zmapFeature/zmapStyle.c
index a0813f361..b88eac2e1 100755
--- a/src/zmapFeature/zmapStyle.c
+++ b/src/zmapFeature/zmapStyle.c
@@ -28,7 +28,7 @@
  *
  * Exported functions: See ZMap/zmapStyle.h
  *
- * CVS info:   $Id: zmapStyle.c,v 1.46 2010-04-19 11:00:39 mh17 Exp $
+ * CVS info:   $Id: zmapStyle.c,v 1.47 2010-04-19 11:45:57 mh17 Exp $
  *-------------------------------------------------------------------
  */
 
@@ -966,8 +966,11 @@ gboolean zMapStyleMakeDrawable(ZMapFeatureTypeStyle style)
         style->curr_bump_mode = ZMAPBUMP_UNBUMP ;
       }
 
-      if (!zMapStyleIsPropertySetId(style,STYLE_PROP_BUMP_DEFAULT))
+      if (!zMapStyleIsPropertySetId(style,STYLE_PROP_BUMP_DEFAULT) && style->mode != ZMAPSTYLE_MODE_GLYPH)
       {
+        // MH17: as glyphs are sub-features we can't bump
+        // this would break 'column default bump mode'
+        // feature type glyphs can have default-bump-mode' set explicitly in the style
         zmapStyleSetIsSet(style,STYLE_PROP_BUMP_DEFAULT);
         style->default_bump_mode = ZMAPBUMP_UNBUMP ;
       }
-- 
GitLab