Also pause translation when expanding the current outline-item (PR 17176 follow-up)
Depending on the structure of the outline we could potentially need to expand a few levels, especially in long PDF documents, hence it cannot hurt to pause translation in that case as well.
This commit is contained in:
parent
f528f6f07b
commit
bf7e8126df
@ -161,6 +161,8 @@ class BaseTreeViewer {
|
|||||||
if (!treeItem) {
|
if (!treeItem) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// Pause translation when expanding the treeItem.
|
||||||
|
this._l10n.pause();
|
||||||
// Ensure that the treeItem is *fully* expanded, such that it will first of
|
// Ensure that the treeItem is *fully* expanded, such that it will first of
|
||||||
// all be visible and secondly that scrolling it into view works correctly.
|
// all be visible and secondly that scrolling it into view works correctly.
|
||||||
let currentNode = treeItem.parentNode;
|
let currentNode = treeItem.parentNode;
|
||||||
@ -171,6 +173,8 @@ class BaseTreeViewer {
|
|||||||
}
|
}
|
||||||
currentNode = currentNode.parentNode;
|
currentNode = currentNode.parentNode;
|
||||||
}
|
}
|
||||||
|
this._l10n.resume();
|
||||||
|
|
||||||
this._updateCurrentTreeItem(treeItem);
|
this._updateCurrentTreeItem(treeItem);
|
||||||
|
|
||||||
this.container.scrollTo(
|
this.container.scrollTo(
|
||||||
|
Loading…
Reference in New Issue
Block a user