diff --git a/src/zmapWindow/zmapWindowFeature.c b/src/zmapWindow/zmapWindowFeature.c index 3defd022b44d80a412fd51ae2e87d2ffa682d716..2dd575633ac466e65edf48717a4e6f67eeb0fc77 100755 --- a/src/zmapWindow/zmapWindowFeature.c +++ b/src/zmapWindow/zmapWindowFeature.c @@ -28,9 +28,9 @@ * * Exported functions: See zmapWindow_P.h * HISTORY: - * Last edited: Oct 18 14:14 2006 (rds) + * Last edited: Oct 19 13:55 2006 (rds) * Created: Mon Jan 9 10:25:40 2006 (edgrif) - * CVS info: $Id: zmapWindowFeature.c,v 1.56 2006-10-18 15:22:09 rds Exp $ + * CVS info: $Id: zmapWindowFeature.c,v 1.57 2006-10-19 13:16:54 rds Exp $ *------------------------------------------------------------------- */ @@ -466,7 +466,7 @@ FooCanvasItem *zmapWindowFeatureDraw(ZMapWindow window, FooCanvasGroup *set_grou /* Retrieve the parent col. group/id. */ column_group = zmapWindowContainerGetFeatures(set_group) ; - //#ifdef RDS_THESE_NEED_A_LITTLE_BIT_OF_CHECKING +#ifdef RDS_THESE_NEED_A_LITTLE_BIT_OF_CHECKING new_feature = zmapWindowFToIFactoryRunSingle(window->item_factory, set_group, context, @@ -475,7 +475,7 @@ FooCanvasItem *zmapWindowFeatureDraw(ZMapWindow window, FooCanvasGroup *set_grou set, feature); return new_feature; - //#endif +#endif /* Get the styles table from the column and look for the features style.... */ @@ -995,13 +995,14 @@ static FooCanvasItem *drawAlignmentFeature(FooCanvasGroup *parent, ZMapFeature f if(q_indel >= t_indel) /* insertion in query, expand align and annotate the insertion */ { - zMapDrawAnnotatePolygon(lastBoxWeDrew, - ZMAP_ANNOTATE_EXTEND_ALIGN, - NULL, - foreground, - bottom, - line_width, - feature->strand); + FooCanvasItem *tmp = NULL; + tmp = zMapDrawAnnotatePolygon(lastBoxWeDrew, + ZMAP_ANNOTATE_EXTEND_ALIGN, + NULL, + foreground, + bottom, + line_width, + feature->strand); /* we need to check here that the item hasn't been * expanded to be too long! This will involve * updating the rather than inserting as the check @@ -1011,6 +1012,10 @@ static FooCanvasItem *drawAlignmentFeature(FooCanvasGroup *parent, ZMapFeature f * t_indel may always be 1, but possible that this is not the case, * code allows it not to be. */ + if(tmp != lastBoxWeDrew) + { + attachDataToItem(tmp, window, feature, ITEM_FEATURE_CHILD, align_data, TRUE); + } } else { diff --git a/src/zmapWindow/zmapWindowItemFactory.c b/src/zmapWindow/zmapWindowItemFactory.c index d72308d5d85dcc558ed9268c41ebac6e2adda03b..cfba71a878927f84988d89d1ea93cfaf116ef79a 100755 --- a/src/zmapWindow/zmapWindowItemFactory.c +++ b/src/zmapWindow/zmapWindowItemFactory.c @@ -27,9 +27,9 @@ * * Exported functions: See XXXXXXXXXXXXX.h * HISTORY: - * Last edited: Oct 18 14:08 2006 (rds) + * Last edited: Oct 19 14:12 2006 (rds) * Created: Mon Sep 25 09:09:52 2006 (rds) - * CVS info: $Id: zmapWindowItemFactory.c,v 1.1 2006-10-18 15:28:41 rds Exp $ + * CVS info: $Id: zmapWindowItemFactory.c,v 1.2 2006-10-19 13:16:20 rds Exp $ *------------------------------------------------------------------- */ @@ -728,13 +728,14 @@ static FooCanvasItem *drawAlignFeature(RunSet run_data, ZMapFeature feature, if(q_indel >= t_indel) /* insertion in query, expand align and annotate the insertion */ { - zMapDrawAnnotatePolygon(lastBoxWeDrew, - ZMAP_ANNOTATE_EXTEND_ALIGN, - NULL, - foreground, - bottom, - line_width, - feature->strand); + FooCanvasItem *tmp = NULL; + tmp = zMapDrawAnnotatePolygon(lastBoxWeDrew, + ZMAP_ANNOTATE_EXTEND_ALIGN, + NULL, + foreground, + bottom, + line_width, + feature->strand); /* we need to check here that the item hasn't been * expanded to be too long! This will involve * updating the rather than inserting as the check @@ -744,6 +745,9 @@ static FooCanvasItem *drawAlignFeature(RunSet run_data, ZMapFeature feature, * t_indel may always be 1, but possible that this is not the case, * code allows it not to be. */ + /* using bottom twice here is wrong */ + if(tmp != NULL && tmp != lastBoxWeDrew) + callItemHandler(factory, tmp, ITEM_FEATURE_CHILD, feature, align_data, bottom, bottom); } else {