Skip to content

Commit

Permalink
better error messages when tryng to do forbidden actions on rotated o…
Browse files Browse the repository at this point in the history
…bjects
  • Loading branch information
viliusle committed Apr 21, 2023
1 parent e502292 commit b71c64b
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/js/tools/blur.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class Blur_class extends Base_tools_class {
return;
}
if (config.layer.rotate || 0 > 0) {
alertify.error('Erase on rotate object is disabled. Sorry.');
alertify.error('Erase on rotate object is disabled. Please rasterize first.');
return;
}
this.started = true;
Expand Down
10 changes: 5 additions & 5 deletions src/js/tools/clone.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class Clone_class extends Base_tools_class {
return;
}
if (config.layer.rotate || 0 > 0) {
alertify.error('Erase on rotate object is disabled. Sorry.');
alertify.error('Erase on rotate object is disabled. Please rasterize first.');
return;
}
if (e.which == 3 && mouse.valid == true) {
Expand Down Expand Up @@ -156,7 +156,7 @@ class Clone_class extends Base_tools_class {
return;
}
if (config.layer.rotate || 0 > 0) {
alertify.error('Erase on rotate object is disabled. Sorry.');
alertify.error('Erase on rotate object is disabled. Please rasterize first.');
return;
}

Expand Down Expand Up @@ -189,21 +189,21 @@ class Clone_class extends Base_tools_class {
return;
}
if (config.layer.rotate || 0 > 0) {
alertify.error('Erase on rotate object is disabled. Sorry.');
alertify.error('Erase on rotate object is disabled. Please rasterize first.');
return;
}
if (this.clone_coords === null) {
alertify.error('Source is empty, right click on image or use long press to save source position.');
return;
}
if (layer.width != layer.width_original || layer.height != layer.height_original) {
alertify.error('Clone tool disabled for resized image. Sorry.');
alertify.error('Clone tool disabled for resized image. Please rasterize first.');
return;
}
if (params.source_layer.value == 'Previous' &&
(previous_layer.width != previous_layer.width_original
|| previous_layer.height != previous_layer.height_original)) {
alertify.error('Clone tool disabled for resized image. Sorry.');
alertify.error('Clone tool disabled for resized image. Please rasterize first.');
return;
}
if (params.source_layer.value == 'Previous') {
Expand Down
2 changes: 1 addition & 1 deletion src/js/tools/desaturate.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class Desaturate_class extends Base_tools_class {
return;
}
if (config.layer.rotate || 0 > 0) {
alertify.error('Erase on rotate object is disabled. Sorry.');
alertify.error('Erase on rotate object is disabled. Please rasterize first.');
return;
}
this.started = true;
Expand Down
2 changes: 1 addition & 1 deletion src/js/tools/erase.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class Erase_class extends Base_tools_class {
return;
}
if (config.layer.rotate || 0 > 0) {
alertify.error('Erase on rotate object is disabled. Sorry.');
alertify.error('Erase on rotate object is disabled. Please rasterize first.');
return;
}
this.started = true;
Expand Down
2 changes: 1 addition & 1 deletion src/js/tools/fill.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Fill_class extends Base_tools_class {
return;
}
if (config.layer.rotate || 0 > 0) {
alertify.error('Erase on rotate object is disabled. Sorry.');
alertify.error('Erase on rotate object is disabled. Please rasterize first.');
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/js/tools/magic_erase.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Magic_erase_class extends Base_tools_class {
return;
}
if (config.layer.rotate || 0 > 0) {
alertify.error('Erase on rotate object is disabled. Sorry.');
alertify.error('Erase on rotate object is disabled. Please rasterize first.');
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/js/tools/sharpen.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class Sharpen_class extends Base_tools_class {
return;
}
if (config.layer.rotate || 0 > 0) {
alertify.error('Erase on rotate object is disabled. Sorry.');
alertify.error('Erase on rotate object is disabled. Please rasterize first.');
return;
}
this.started = true;
Expand Down

0 comments on commit b71c64b

Please sign in to comment.