Tag newTag = new Tag();
newTag.setUpdateSequenceNum(0);
newTag.setGuid(randint);
newTag.setName(edit.getTag());
if (edit.getParentTag().isChecked()) {
newTag.setParentGuid(currentSelection.text(2));
newTag.setParentGuidIsSet(true);
currentSelection.setExpanded(true);
}
conn.getTagTable().addTag(newTag, true);
listManager.getTagIndex().add(newTag);