}
// Edit an existing tag
@SuppressWarnings("unused")
private void editTag() {
logger.log(logger.HIGH, "Entering NeverNote.editTag");
TagEdit edit = new TagEdit();
edit.setTitle("Edit Tag");
List<QTreeWidgetItem> selections = tagTree.selectedItems();
QTreeWidgetItem currentSelection;
currentSelection = selections.get(0);
edit.setTag(currentSelection.text(0));
edit.setTagList(listManager.getTagIndex());
edit.exec();
if (!edit.okPressed())
return;
String guid = currentSelection.text(2);
currentSelection.setText(0,edit.getTag());
for (int i=0; i<listManager.getTagIndex().size(); i++) {
if (listManager.getTagIndex().get(i).getGuid().equals(guid)) {
listManager.getTagIndex().get(i).setName(edit.getTag());
conn.getTagTable().updateTag(listManager.getTagIndex().get(i), true);
updateListTagName(guid);
if (currentNote != null && currentNote.getTagGuids().contains(guid))
browserWindow.setTag(getTagNamesForNote(currentNote));
logger.log(logger.HIGH, "Leaving NeverNote.editTag");
//return;
}
}
listManager.reloadNoteTagNames(guid, edit.getTag());
noteIndexUpdated(true);
refreshEvernoteNote(true);
browserWindow.setTag(getTagNamesForNote(currentNote));
logger.log(logger.HIGH, "Leaving NeverNote.editTag...");
}