From b735e9402be99fbc45197a5b6967c7efc415cdcb Mon Sep 17 00:00:00 2001 From: Marcel Kronfeld Date: Thu, 20 May 2010 09:01:47 +0000 Subject: [PATCH] More comfortable StringSelection for stats GUI. --- src/eva2/tools/StringSelection.java | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/src/eva2/tools/StringSelection.java b/src/eva2/tools/StringSelection.java index 6e545e5f..2c41b90d 100644 --- a/src/eva2/tools/StringSelection.java +++ b/src/eva2/tools/StringSelection.java @@ -144,16 +144,35 @@ public class StringSelection implements Serializable { } /** - * Apply the selection state of the given instance to this instance. Is only done - * for Strings which are equivalent and at the same index. + * Apply the selection state of the given instance to this instance. Compares + * Strings and takes over the selection state if they are equal. * * @param sel */ public void takeOverSelection(StringSelection sel) { - // try to apply the same selection for equivalent string (must be in same order) - for (int i=0; i=0) { + // double look search to find matching elements (equal strings) + for (int i=mismatchAt; i