mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 10:17:41 +00:00
3201 merge changes from 3199 regarding refactor of addTagName method name
This commit is contained in:
parent
0b27196ad4
commit
8533ce98fb
@ -180,7 +180,7 @@ final class TagNameDefinition implements Comparable<TagNameDefinition> {
|
||||
private TagName saveToCase(SleuthkitCase caseDb) {
|
||||
TagName tagName = null;
|
||||
try {
|
||||
tagName = caseDb.addTagName(displayName, description, color, knownStatus);
|
||||
tagName = caseDb.addOrUpdateTagName(displayName, description, color, knownStatus);
|
||||
} catch (TskCoreException ex) {
|
||||
Exceptions.printStackTrace(ex);
|
||||
}
|
||||
|
@ -138,7 +138,6 @@ final class TagNameDialog extends javax.swing.JDialog {
|
||||
}
|
||||
//if a tag name contains illegal characters and is not the name of one of the standard tags
|
||||
if (TagsManager.containsIllegalCharacters(newTagDisplayName) && !TagNameDefinition.getStandardTagNames().contains(newTagDisplayName)) {
|
||||
|
||||
JOptionPane.showMessageDialog(null,
|
||||
NbBundle.getMessage(TagNameDialog.class, "TagNameDialog.JOptionPane.tagNameIllegalCharacters.message"),
|
||||
NbBundle.getMessage(TagNameDialog.class, "TagNameDialog.JOptionPane.tagNameIllegalCharacters.title"),
|
||||
|
@ -255,7 +255,7 @@ public class TagsManager implements Closeable {
|
||||
*/
|
||||
public synchronized TagName addTagName(String displayName, String description, TagName.HTML_COLOR color, TskData.FileKnown knownStatus) throws TagNameAlreadyExistsException, TskCoreException {
|
||||
try {
|
||||
TagName tagName = caseDb.addTagName(displayName, description, color, knownStatus);
|
||||
TagName tagName = caseDb.addOrUpdateTagName(displayName, description, color, knownStatus);
|
||||
Set<TagNameDefinition> customTypes = TagNameDefinition.getTagNameDefinitions();
|
||||
customTypes.add(new TagNameDefinition(displayName, description, color, knownStatus));
|
||||
TagNameDefinition.setTagNameDefinitions(customTypes);
|
||||
|
Loading…
x
Reference in New Issue
Block a user