PDF editor: Fix bug in previous change (Z#23162122)

This commit is contained in:
Raphael Michel
2024-08-08 13:36:50 +02:00
parent 022f44ad00
commit 024a223ec7

View File

@@ -608,14 +608,18 @@ var editor = {
$("#loading-initial").remove(); $("#loading-initial").remove();
}); });
} }
editor._update_version_notice();
}, },
_update_toolbox_values: function () { _update_version_notice: function () {
$("#version-notice").toggle( $("#version-notice").toggle(
editor._other_page_objects.some((o) => o.type === "textcontainer") || editor._other_page_objects.some((o) => o.type === "textcontainer") ||
editor.fabric.getObjects().some((o) => o.type === "textcontainer") editor.fabric.getObjects().some((o) => o.type === "textcontainer")
); );
},
_update_toolbox_values: function () {
editor._update_version_notice();
var o = editor.fabric.getActiveObject(); var o = editor.fabric.getActiveObject();
if (!o) { if (!o) {
return; return;
@@ -1419,7 +1423,6 @@ var editor = {
editor._update_save_button(); editor._update_save_button();
}); });
$("#pdf-info-width, #pdf-info-height").bind('change input', editor._paper_size_warning); $("#pdf-info-width, #pdf-info-height").bind('change input', editor._paper_size_warning);
editor._update_toolbox_values();
$.getJSON($("#schema-url").text(), function (data) { $.getJSON($("#schema-url").text(), function (data) {
editor.schema = data; editor.schema = data;