mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-13 23:05:54 +01:00
Reset Option#setFrom when its value is changed.
This commit is contained in:
@@ -142,6 +142,7 @@ const Option = Class("Option", {
|
|||||||
this.globalValue = newValues;
|
this.globalValue = newValues;
|
||||||
|
|
||||||
this.hasChanged = true;
|
this.hasChanged = true;
|
||||||
|
this.setFrom = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1060,7 +1061,6 @@ const Options = Module("options", {
|
|||||||
option.reset();
|
option.reset();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
option.setFrom = modifiers.setFrom || null;
|
|
||||||
option.reset();
|
option.reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1083,8 +1083,6 @@ const Options = Module("options", {
|
|||||||
}
|
}
|
||||||
// write access
|
// write access
|
||||||
else {
|
else {
|
||||||
option.setFrom = modifiers.setFrom || null;
|
|
||||||
|
|
||||||
if (opt.option.type == "boolean") {
|
if (opt.option.type == "boolean") {
|
||||||
dactyl.assert(!opt.valueGiven, "E474: Invalid argument: " + arg);
|
dactyl.assert(!opt.valueGiven, "E474: Invalid argument: " + arg);
|
||||||
opt.values = !opt.unsetBoolean;
|
opt.values = !opt.unsetBoolean;
|
||||||
@@ -1097,6 +1095,7 @@ const Options = Module("options", {
|
|||||||
}
|
}
|
||||||
if (res)
|
if (res)
|
||||||
dactyl.echoerr(res);
|
dactyl.echoerr(res);
|
||||||
|
option.setFrom = modifiers.setFrom || null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user