aboutsummaryrefslogtreecommitdiff
path: root/src/reproject.c
diff options
context:
space:
mode:
authortaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2007-10-31 17:23:10 +0000
committertaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2007-10-31 17:23:10 +0000
commitd2c4ca0e9358b048946ae9f484474826a278f5ac (patch)
treeb2b4c72d3cb9e47d4d7ece1303ceb04514174fc3 /src/reproject.c
parent68aaef4f7d3a73153f6052b731aae559da45a4d2 (diff)
Update the reprojection window after refinement step
git-svn-id: svn://cook.msm.cam.ac.uk:745/diff-tomo/dtr@187 bf6ca9ba-c028-0410-8290-897cf20841d1
Diffstat (limited to 'src/reproject.c')
-rw-r--r--src/reproject.c33
1 files changed, 25 insertions, 8 deletions
diff --git a/src/reproject.c b/src/reproject.c
index c41f173..c0dfc73 100644
--- a/src/reproject.c
+++ b/src/reproject.c
@@ -259,24 +259,41 @@ static void reproject_mark_peaks(ControlContext *ctx) {
image_feature_list_free(rflist);
}
-
-static gint reproject_clicked(GtkWidget *widget, GdkEventButton *event, ControlContext *ctx) {
-
-
- ctx->reproject_cur_image++;
- if ( ctx->reproject_cur_image == ctx->images->n_images ) ctx->reproject_cur_image = 0;
+static void reproject_update(ControlContext *ctx) {
+
imagedisplay_clear_marks(ctx->reproject_id);
- reflectionlist_clear_markers(ctx->reflectionlist);
+ //reflectionlist_clear_markers(ctx->reflectionlist);
reproject_mark_peaks(ctx);
imagedisplay_put_data(ctx->reproject_id, ctx->images->images[ctx->reproject_cur_image]);
+}
+
+static gint reproject_clicked(GtkWidget *widget, GdkEventButton *event, ControlContext *ctx) {
+
+ ctx->reproject_cur_image++;
+ if ( ctx->reproject_cur_image == ctx->images->n_images ) ctx->reproject_cur_image = 0;
+
+ reproject_update(ctx);
+
return 0;
}
+void reproject_lattice_changed(ControlContext *ctx) {
+
+ if ( ctx->cell_lattice ) {
+ reflection_list_from_new_cell(ctx->cell_lattice, ctx->cell);
+ } else {
+ ctx->cell_lattice = reflection_list_from_cell(ctx->cell);
+ }
+
+ if ( ctx->reproject_id ) reproject_update(ctx);
+
+}
+
static gint reproject_closed(GtkWidget *widget, ControlContext *ctx) {
ctx->reproject_id = NULL;
return 0;
@@ -301,8 +318,8 @@ void reproject_open(ControlContext *ctx) {
return;
}
- ctx->cell_lattice = reflection_list_from_cell(ctx->cell);
ctx->reproject_cur_image = 0;
+ reproject_lattice_changed(ctx);
ctx->reproject_id = imagedisplay_open_with_message(ctx->images->images[ctx->reproject_cur_image],
"Reprojected Diffraction Pattern", "Click to change image",