Fixed mode switch bug

This commit is contained in:
unsettledgames 2020-09-12 11:45:27 +02:00
parent 232e08f84d
commit a56c9576a9
2 changed files with 2 additions and 4 deletions

View File

@ -26,11 +26,8 @@ function switchMode(currentMode, mustConfirm = true) {
//switch to basic mode //switch to basic mode
else { else {
//if there is a current layer (a document is active) //if there is a current layer (a document is active)
if (currentLayer) { if (currentLayer) {
//confirm with user before flattening image //confirm with user before flattening image
if (mustConfirm ) { if (mustConfirm ) {
if (!confirm('Switching to basic mode will flatten all the visible layers. Are you sure you want to continue?')) { if (!confirm('Switching to basic mode will flatten all the visible layers. Are you sure you want to continue?')) {

View File

@ -244,9 +244,10 @@ class Layer {
layer.menuEntry.classList.add("selected-layer"); layer.menuEntry.classList.add("selected-layer");
currentLayer = layer; currentLayer = layer;
} }
/*
canvas = currentLayer.canvas; canvas = currentLayer.canvas;
context = currentLayer.context; context = currentLayer.context;
*/
} }
toggleLock() { toggleLock() {