From 3508ca0a8a644c9b625a32a17774bdf24299c08a Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Fri, 24 Sep 2010 12:49:12 -0400 Subject: [PATCH] Reset Option#setFrom when its value is changed. --- common/content/options.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/common/content/options.js b/common/content/options.js index 45525735..5546e4da 100644 --- a/common/content/options.js +++ b/common/content/options.js @@ -142,6 +142,7 @@ const Option = Class("Option", { this.globalValue = newValues; this.hasChanged = true; + this.setFrom = null; }, /** @@ -1060,7 +1061,6 @@ const Options = Module("options", { option.reset(); } else { - option.setFrom = modifiers.setFrom || null; option.reset(); } } @@ -1083,8 +1083,6 @@ const Options = Module("options", { } // write access else { - option.setFrom = modifiers.setFrom || null; - if (opt.option.type == "boolean") { dactyl.assert(!opt.valueGiven, "E474: Invalid argument: " + arg); opt.values = !opt.unsetBoolean; @@ -1097,6 +1095,7 @@ const Options = Module("options", { } if (res) dactyl.echoerr(res); + option.setFrom = modifiers.setFrom || null; } } }