From 39683744ce00f48bb4e92a24772678d0fe13c73c Mon Sep 17 00:00:00 2001 From: gb10 <gb10> Date: Mon, 6 Sep 2010 09:21:35 +0000 Subject: [PATCH] Fixed a bug with getting dotter coords from the current big-picture display range in protein blixem --- blxdotter.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/blxdotter.c b/blxdotter.c index 41e36664..97497f6d 100644 --- a/blxdotter.c +++ b/blxdotter.c @@ -193,9 +193,12 @@ static void onBpRangeButtonClicked(GtkWidget *button, gpointer data) BlxViewContext *bc = blxWindowGetContext(dialogData->blxWindow); GtkWidget *bigPicture = blxWindowGetBigPicture(dialogData->blxWindow); const IntRange const *displayRange = bigPictureGetDisplayRange(bigPicture); + + const int qStart = convertDisplayIdxToDnaIdx(displayRange->min, bc->seqType, 1, 1, bc->numFrames, bc->displayRev, &bc->refSeqRange); + const int qEnd = convertDisplayIdxToDnaIdx(displayRange->max, bc->seqType, 1, bc->numFrames, bc->numFrames, bc->displayRev, &bc->refSeqRange); - char *startString = convertIntToString(bc->displayRev ? displayRange->max : displayRange->min); - char *endString = convertIntToString(bc->displayRev ? displayRange->min : displayRange->max); + char *startString = convertIntToString(qStart); + char *endString = convertIntToString(qEnd); gtk_entry_set_text(GTK_ENTRY(dialogData->startEntry), startString); gtk_entry_set_text(GTK_ENTRY(dialogData->endEntry), endString); -- GitLab