浏览代码

Removed excess auto-baking when an operation is added to the recipe. Fixes #120.

n1474335 8 年之前
父节点
当前提交
39f36c9184
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      src/web/RecipeWaiter.js

+ 3 - 2
src/web/RecipeWaiter.js

@@ -26,7 +26,6 @@ var RecipeWaiter = function(app, manager) {
 RecipeWaiter.prototype.initialiseOperationDragNDrop = function() {
     var recList = document.getElementById("rec-list");
 
-
     // Recipe list
     Sortable.create(recList, {
         group: "recipe",
@@ -45,7 +44,9 @@ RecipeWaiter.prototype.initialiseOperationDragNDrop = function() {
             }
         }.bind(this),
         onSort: function(evt) {
-            document.dispatchEvent(this.manager.statechange);
+            if (evt.from.id === "rec-list") {
+                document.dispatchEvent(this.manager.statechange);
+            }
         }.bind(this)
     });