From c04d21e1e3cce5e29dca860ca1c96c7c441fa720 Mon Sep 17 00:00:00 2001 From: Unoqwy Date: Wed, 16 Jun 2021 00:10:26 +0200 Subject: [PATCH] Fix toolbars not showing new order without reload --- js/interface/actions.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/interface/actions.js b/js/interface/actions.js index 4fed9e7f..8e95cac7 100644 --- a/js/interface/actions.js +++ b/js/interface/actions.js @@ -1178,7 +1178,7 @@ class Toolbar { } return this; } - update() { + update(force) { var scope = this; // check if some unkown actions are now known @@ -1205,7 +1205,7 @@ class Toolbar { } //scope.condition_cache.empty(); - let needsUpdate = scope.condition_cache.length !== scope.children.length; + let needsUpdate = force === true || scope.condition_cache.length !== scope.children.length; scope.condition_cache.length = scope.children.length; this.children.forEach(function(item, i) { @@ -1949,14 +1949,14 @@ const BARS = { $('#bar_items_current .tooltip').css('display', 'none') }, update: function() { - BARS.editing_bar.update().save(); + BARS.editing_bar.update(true).save(); }, addItem: function(item) { if (item.type === 'separator') { item = '_' } BARS.editing_bar.add(item); - BARS.editing_bar.update().save(); + // BARS.editing_bar.update().save(); already called in add() } } })