Fix popup preview disappearing after changing a setting (#1707)
This commit is contained in:
parent
5188e49cd4
commit
8e330d54d6
@ -565,6 +565,7 @@ class Frontend {
|
||||
|
||||
_updateTextScannerEnabled() {
|
||||
const enabled = (this._options !== null && this._options.general.enable && !this._disabledOverride);
|
||||
if (enabled === this._textScanner.isEnabled()) { return; }
|
||||
this._textScanner.setEnabled(enabled);
|
||||
this._clearSelection(true);
|
||||
}
|
||||
|
@ -119,6 +119,10 @@ class TextScanner extends EventDispatcher {
|
||||
this.setEnabled(this._enabled);
|
||||
}
|
||||
|
||||
isEnabled() {
|
||||
return this._enabled;
|
||||
}
|
||||
|
||||
setEnabled(enabled) {
|
||||
this._enabled = enabled;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user