Merge pull request #17344 from calixteman/issue17342
[Editor] Avoid to add a new ink editor when we aren't editing anymore
This commit is contained in:
commit
4bf7ff2027
@ -152,10 +152,8 @@ class AnnotationEditorLayer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
addInkEditorIfNeeded(isCommitting) {
|
addInkEditorIfNeeded(isCommitting) {
|
||||||
if (
|
if (this.#uiManager.getMode() !== AnnotationEditorType.INK) {
|
||||||
!isCommitting &&
|
// We don't want to add an ink editor if we're not in ink mode!
|
||||||
this.#uiManager.getMode() !== AnnotationEditorType.INK
|
|
||||||
) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1604,7 +1604,11 @@ class AnnotationEditorUIManager {
|
|||||||
if (this.#activeEditor) {
|
if (this.#activeEditor) {
|
||||||
// An editor is being edited so just commit it.
|
// An editor is being edited so just commit it.
|
||||||
this.#activeEditor.commitOrRemove();
|
this.#activeEditor.commitOrRemove();
|
||||||
return;
|
if (this.#mode !== AnnotationEditorType.NONE) {
|
||||||
|
// If the mode is NONE, we want to really unselect the editor, hence we
|
||||||
|
// mustn't return here.
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.hasSelection) {
|
if (!this.hasSelection) {
|
||||||
|
Loading…
Reference in New Issue
Block a user