mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 18:17:43 +00:00
2541 trim trailing and leading spaces from list names to avoid visual dupes
This commit is contained in:
parent
ff55fd7412
commit
1b1ef37288
@ -114,11 +114,16 @@ final class GlobalListSettingsPanel extends javax.swing.JPanel implements Option
|
|||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
currentKeywordList.getName());
|
currentKeywordList.getName());
|
||||||
//if the name is null, empty, or unchanged return without changing anything
|
|
||||||
if (listName == null || listName.trim().equals("") || listName.equals(currentKeywordList.getName())) {
|
if (listName == null ) {
|
||||||
|
return shouldAdd;
|
||||||
|
}
|
||||||
|
//remove trailing and leading spaces so lists can't have visually identical names
|
||||||
|
listName = listName.trim();
|
||||||
|
//if the name is empty or unchanged return without changing anything
|
||||||
|
if (listName.equals("") || listName.equals(currentKeywordList.getName())) {
|
||||||
return shouldAdd;
|
return shouldAdd;
|
||||||
}
|
}
|
||||||
|
|
||||||
XmlKeywordSearchList writer = XmlKeywordSearchList.getCurrent();
|
XmlKeywordSearchList writer = XmlKeywordSearchList.getCurrent();
|
||||||
if (writer.listExists(listName) && writer.getList(listName).isEditable()) {
|
if (writer.listExists(listName) && writer.getList(listName).isEditable()) {
|
||||||
KeywordSearchUtil.displayDialog(FEATURE_NAME, NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel1.customizeComponents.noOwDefaultMsg"), KeywordSearchUtil.DIALOG_MESSAGE_TYPE.WARN);
|
KeywordSearchUtil.displayDialog(FEATURE_NAME, NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel1.customizeComponents.noOwDefaultMsg"), KeywordSearchUtil.DIALOG_MESSAGE_TYPE.WARN);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user