From 77821e49edbcd0f3b4a44be6ea25e89a14dd2065 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szymon=20K=C5=82os?= Date: Tue, 13 Apr 2021 09:42:25 +0200 Subject: [PATCH] notebookbar: reinitialize only once MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ie931a5d443505fe5d60637cb4a6f24c1a22fbfa4 Signed-off-by: Szymon Kłos --- loleaflet/src/control/Control.Notebookbar.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/loleaflet/src/control/Control.Notebookbar.js b/loleaflet/src/control/Control.Notebookbar.js index b0c4e3c44..0f65346ff 100644 --- a/loleaflet/src/control/Control.Notebookbar.js +++ b/loleaflet/src/control/Control.Notebookbar.js @@ -58,9 +58,7 @@ L.Control.Notebookbar = L.Control.extend({ var retryNotebookbarInit = function() { if (!that.map._isNotebookbarLoadedOnCore) { console.error('notebookbar is not initialized, retrying'); - that.map.sendUnoCommand('.uno:Notebookbar?File:string=notebookbar.ui'); - that.map.sendUnoCommand('.uno:ToolbarMode?Mode:string=notebookbar.ui'); - that.retry = setTimeout(retryNotebookbarInit, 10000); + that.map.sendUnoCommand('.uno:ToolbarMode?Mode:string=notebookbar_online.ui'); } }; @@ -69,6 +67,7 @@ L.Control.Notebookbar = L.Control.extend({ onRemove: function() { clearTimeout(this.retry); + this.map.sendUnoCommand('.uno:ToolbarMode?Mode:string=Default'); this.map.off('contextchange', this.onContextChange, this); this.map.off('updatepermission', this.onUpdatePermission, this); this.map.off('notebookbar');