Prevent "Smear, Smear" and "Smear, Stamp"

main
Isaiah Odhner 2019-12-08 19:26:55 -05:00
parent e041e7afa9
commit cbfcb47681
1 changed files with 4 additions and 2 deletions

View File

@ -107,7 +107,8 @@ class OnCanvasSelection extends OnCanvasObject {
if (e.shiftKey) {
// Stamp or start to smear selection
this.draw();
if (!(`${get_last_action_detail()}`.match(/Stamp/i))) {
// a Smear after a Stamp without a Move in between doesn't do much!
if (!(`${get_last_action_detail()}`.match(/Stamp|Smear/i))) {
add_action_detail("Stamp");
}
}
@ -115,7 +116,8 @@ class OnCanvasSelection extends OnCanvasObject {
else if (e.ctrlKey) {
// Stamp selection
this.draw();
if (!(`${get_last_action_detail()}`.match(/Stamp/i))) {
// a Smear after a Stamp without a Move in between doesn't do much!
if (!(`${get_last_action_detail()}`.match(/Stamp|Smear/i))) {
add_action_detail("Stamp");
}
}