Fix scanning inputs upgrade using the wrong format (#805)

This commit is contained in:
toasted-nutbread 2020-09-11 00:29:38 -04:00 committed by GitHub
parent a531618c48
commit 18634dca1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -493,19 +493,27 @@ class OptionsUtil {
const {modifier, middleMouse} = profileOptions.scanning;
const scanningInputs = [];
let modifierInput = '';
switch (modifier) {
case 'alt':
case 'ctrl':
case 'shift':
case 'meta':
scanningInputs.push(modifier);
modifierInput = modifier;
break;
case 'none':
scanningInputs.push('');
modifierInput = '';
break;
}
scanningInputs.push({
include: modifierInput,
exclude: ''
});
if (middleMouse) {
scanningInputs.push('mouse2');
scanningInputs.push({
include: 'mouse2',
exclude: ''
});
}
profileOptions.scanning.inputs = scanningInputs;
}