Skip to content

Commit

Permalink
Multiple identical tags gives a warning instead of a blocking error, …
Browse files Browse the repository at this point in the history
…fixed label names from 'patch' to 'path'.
  • Loading branch information
Nsyse committed Sep 10, 2016
1 parent 7d01c3e commit df7bf03
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
Binary file renamed LazyPoster V0,4,4.jar → LazyPoster V0,4,5.jar
Binary file not shown.
Expand Up @@ -12,8 +12,8 @@
* Created by Nsyse on 2016-03-27.
*/
public class PathSubmissionFormElement extends SubmissionFormElement {
private String defaultImagePathFieldText = "<- Select Image Patch";
private String defaultThumbnailPathFieldText = "<- Select Thumbnail Patch";
private String defaultImagePathFieldText = "<- Select Image Path";
private String defaultThumbnailPathFieldText = "<- Select Thumbnail Path";
private JLabel selectFileLabel;
private JButton selectFileButton;

Expand Down
Expand Up @@ -46,11 +46,13 @@ public String validateFields() {
if (! tagsField.getText().equals(defaultTagFieldText)) {
ArrayList<String> tags = getAllTags();
Set<String> tagsSet = new HashSet<String>(tags);
if (tags.size() <= 1) {
errorMessage = "- At least two tags are needed!";
if (tagsSet.size() <= 1) {
errorMessage = "- At least two different tags are needed!";
}
if (tagsSet.size() < tags.size()) {
errorMessage = "- Duplicate tags were found!";
//Pop a warning message saying duplicate tags were entered and will be ignored.
String duplicateTagsMsg = "Duplicate tags were found!\nOne of each unique tag will be kept.";
JOptionPane.showMessageDialog(null, duplicateTagsMsg, "FUCKK", JOptionPane.WARNING_MESSAGE);
}
}
else{
Expand Down

0 comments on commit df7bf03

Please sign in to comment.