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 {modifier, middleMouse} = profileOptions.scanning;
const scanningInputs = []; const scanningInputs = [];
let modifierInput = '';
switch (modifier) { switch (modifier) {
case 'alt': case 'alt':
case 'ctrl': case 'ctrl':
case 'shift': case 'shift':
case 'meta': case 'meta':
scanningInputs.push(modifier); modifierInput = modifier;
break; break;
case 'none': case 'none':
scanningInputs.push(''); modifierInput = '';
break; break;
} }
scanningInputs.push({
include: modifierInput,
exclude: ''
});
if (middleMouse) { if (middleMouse) {
scanningInputs.push('mouse2'); scanningInputs.push({
include: 'mouse2',
exclude: ''
});
} }
profileOptions.scanning.inputs = scanningInputs; profileOptions.scanning.inputs = scanningInputs;
} }