expand to note to be able to activate note

This commit is contained in:
zadam 2020-01-01 19:46:27 +01:00
parent 631a75deec
commit 8b9bf6e46f

View File

@ -174,7 +174,11 @@ async function showTab(tabId) {
if (newActiveTabContext && newActiveTabContext.notePath) {
const newActiveNode = await treeService.getNodeFromPath(newActiveTabContext.notePath);
if (newActiveNode && newActiveNode.isVisible()) {
if (newActiveNode) {
if (!newActiveNode.isVisible()) {
await treeService.expandToNote(newActiveTabContext.notePath);
}
newActiveNode.setActive(true, {noEvents: true});
}
}