Merge pull request #4016 from IgorA100/patch-101

Fix: Clear the "changedMonitors" array when "mode == EDITING" and errors in getting "layout" (montage.js)
pull/4020/head
Isaac Connor 2024-05-21 09:25:59 -04:00 committed by GitHub
commit e373d57814
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -111,6 +111,7 @@ function playClicked() {
*/
function selectLayout(new_layout_id) {
if (mode == EDITING) {
changedMonitors.length = 0;
return;
}
const ddm = $j('#zmMontageLayout');
@ -120,12 +121,14 @@ function selectLayout(new_layout_id) {
const layout_id = parseInt(ddm.val());
if (!layout_id) {
console.log("No layout_id?!");
changedMonitors.length = 0;
return;
}
const layout = layouts[layout_id];
if (!layout) {
console.log("No layout found for " + layout_id);
changedMonitors.length = 0;
return;
}