Merge pull request #17388 from calixteman/no_double_color_picker
[Editor] Avoid to have a color picker for highlighting twice in the main toolbar
This commit is contained in:
commit
f54cfe065a
@ -121,12 +121,17 @@ class Toolbar {
|
|||||||
this.#bindListeners(options);
|
this.#bindListeners(options);
|
||||||
|
|
||||||
if (options.editorHighlightColorPicker) {
|
if (options.editorHighlightColorPicker) {
|
||||||
this.eventBus._on("annotationeditoruimanager", ({ uiManager }) => {
|
this.eventBus._on(
|
||||||
this.#setAnnotationEditorUIManager(
|
"annotationeditoruimanager",
|
||||||
uiManager,
|
({ uiManager }) => {
|
||||||
options.editorHighlightColorPicker
|
this.#setAnnotationEditorUIManager(
|
||||||
);
|
uiManager,
|
||||||
});
|
options.editorHighlightColorPicker
|
||||||
|
);
|
||||||
|
},
|
||||||
|
// Once the color picker has been added, we don't want to add it again.
|
||||||
|
{ once: true }
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.reset();
|
this.reset();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user