aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui_project.c14
-rw-r--r--src/gui_project.h3
2 files changed, 17 insertions, 0 deletions
diff --git a/src/gui_project.c b/src/gui_project.c
index 3e8eb970..c8257d49 100644
--- a/src/gui_project.c
+++ b/src/gui_project.c
@@ -1077,6 +1077,20 @@ int add_merge_result(struct crystfelproject *proj,
}
+struct gui_merge_result *find_merge_result_by_name(struct crystfelproject *proj,
+ const char *name)
+{
+ int i;
+
+ for ( i=0; i<proj->n_merge_results; i++ ) {
+ if ( strcmp(proj->merge_results[i].name, name) == 0 ) {
+ return &proj->merge_results[i];
+ }
+ }
+ return NULL;
+}
+
+
static void update_result_index(struct gui_indexing_result *result)
{
int i;
diff --git a/src/gui_project.h b/src/gui_project.h
index 81bf3884..f9f34194 100644
--- a/src/gui_project.h
+++ b/src/gui_project.h
@@ -306,6 +306,9 @@ extern int add_merge_result(struct crystfelproject *proj,
char *name,
char *hkl);
+extern struct gui_merge_result *find_merge_result_by_name(struct crystfelproject *proj,
+ const char *name);
+
extern const char *selected_result(struct crystfelproject *proj);
#endif