Add method mainWindow.jumpToTag (#2584)

This commit is contained in:
Patrizio Bekerle 2022-09-13 18:07:42 +02:00
parent 913b684fb3
commit 4e7b370970
No known key found for this signature in database
GPG key ID: 2E9FFD770DABE838
5 changed files with 42 additions and 0 deletions

View file

@ -23,6 +23,8 @@ QtObject {
script.registerCustomAction("transformTextRot13", "Transform selected text with rot13", "rot13", "text-wrap", true);
script.registerCustomAction("noteSubFolder", "Show active note subfolder information", "Subfolder");
script.registerCustomAction("setActiveTag", "Set active tag", "Active tag");
}
/**
@ -83,6 +85,12 @@ QtObject {
script.log(subFolder.fullPath());
script.log(subFolder.relativePath());
break;
// jump to the tag "test" in the tag tree
case "setActiveTag":
var tag = script.getTagByNameBreadcrumbList(["test"]);
mainWindow.jumpToTag(tag.id);
break;
}
}
}