From bdf3c12f7efc84dce19c6d4bc4ece2b980f0f7da Mon Sep 17 00:00:00 2001 From: Albert Cardona Date: Mon, 2 Jul 2012 10:17:26 -0400 Subject: [PATCH] Fix error in duplicating a Patch: the CT and alpha mask couldn't be found, because the file path to the CT and alpha mask files include also the ID of the Patch. While requiring both IDs (the Patch and the CT or alpha mask ID) for the file seems to make the files less reusable, now it's too late to change. Indeed the ID of the Patch is not necessary in that file name. --- ini/trakem2/display/Patch.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ini/trakem2/display/Patch.java b/ini/trakem2/display/Patch.java index e7068357..61d03525 100644 --- a/ini/trakem2/display/Patch.java +++ b/ini/trakem2/display/Patch.java @@ -964,10 +964,10 @@ public final class Patch extends Displayable implements ImageData { copy.channels = this.channels; copy.min = this.min; copy.max = this.max; - copy.ct_id = this.ct_id; // files are immutable so they can be shared - copy.alpha_mask_id = this.alpha_mask_id; // files are immutable so they can be shared - if (pr != this.project) { - // Copy the files over to the other project. + copy.ct_id = this.ct_id; + copy.alpha_mask_id = this.alpha_mask_id; + // Copy the files + if (!copy_id || pr != this.project) { try { if (0 != copy.alpha_mask_id && !Utils.safeCopy( -- 2.11.4.GIT