Fix OO error modal in switch to read-only

pull/1/head
yflory 4 years ago
parent b732666ed0
commit b709b7a31b

@ -1375,12 +1375,11 @@ define([
return;
}
if (lock) {
getEditor().setViewModeDisconnect();
} else if (readOnly) {
if (lock || readOnly) {
try {
getEditor().asc_setRestriction(true);
} catch (e) {}
//getEditor().setViewModeDisconnect(); // can't be used anymore, display an OO error popup
} else {
setEditable(true);
deleteOfflineLocks();
@ -1400,7 +1399,6 @@ define([
}
}
if (isLockedModal.modal && force) {
isLockedModal.modal.closeModal();
delete isLockedModal.modal;
@ -1424,7 +1422,7 @@ define([
} catch (e) {}
}
if (APP.migrate && !readOnly) {
if (lock && !readOnly) {
onMigrateRdy.fire();
}

Loading…
Cancel
Save