]> git.scottworley.com Git - picsort/commitdiff
Leaving the name field empty cancels
authorScott Worley <scottworley@scottworley.com>
Tue, 23 Dec 2014 05:51:19 +0000 (21:51 -0800)
committerScott Worley <scottworley@scottworley.com>
Tue, 23 Dec 2014 05:51:19 +0000 (21:51 -0800)
picsorter.js

index 4f726fb16d6a074b845de5d574f68e5d7b16c4cd..be0371afdd078a122e5eea6d526edc1210e116cb 100644 (file)
@@ -155,10 +155,12 @@ function rotate() {
 
 
 function set_name(name) {
 
 
 function set_name(name) {
-  picinfo[files[input_index]].name = name;
-  save_picinfo();
-  say("Named " + name);
-  last_name = name;
+  if (name) {
+    picinfo[files[input_index]].name = name;
+    save_picinfo();
+    say("Named " + name);
+    last_name = name;
+  }
 }
 
 function set_name_from_form() {
 }
 
 function set_name_from_form() {