From cfe44bde9f71134fa9a9181e105e9a7519c77955 Mon Sep 17 00:00:00 2001 From: jmillman Date: Tue, 16 Jun 2015 12:51:06 -0400 Subject: [PATCH] cleanup Follow Up tag and Category TagNames (prevent short name version from being added, by removing commas) --- .../autopsy/imagegallery/actions/DeleteFollowUpTag.java | 2 ++ .../sleuthkit/autopsy/imagegallery/datamodel/Category.java | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/DeleteFollowUpTag.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/DeleteFollowUpTag.java index 0399b545ed..0fe88de953 100644 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/DeleteFollowUpTag.java +++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/DeleteFollowUpTag.java @@ -78,6 +78,8 @@ public class DeleteFollowUpTag extends Action { } } IngestServices.getInstance().fireModuleDataEvent(new ModuleDataEvent("TagAction", BlackboardArtifact.ARTIFACT_TYPE.TSK_TAG_FILE)); //NON-NLS + + //make sure rest of ui hears category change. controller.getGroupManager().handleFileUpdate(FileUpdateEvent.newUpdateEvent(Collections.singleton(fileID), DrawableAttribute.TAGS)); } catch (TskCoreException ex) { LOGGER.log(Level.SEVERE, "Failed to delete follow up tag.", ex); diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/Category.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/Category.java index 8999fff2f1..7cae09067f 100644 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/Category.java +++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/Category.java @@ -53,6 +53,10 @@ public enum Category { return nameMap.containsKey(tName); } + public static boolean isCategoryTagName(TagName tName) { + return nameMap.containsKey(tName.getDisplayName()); + } + public static boolean isNotCategoryName(String tName) { return nameMap.containsKey(tName) == false; }