mirror of
https://github.com/LorenEteval/Furious.git
synced 2026-10-09 15:19:56 +03:00
Fix Routing settings default value
Signed-off-by: Loren Eteval <loren.eteval@proton.me>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from Furious.Action.Language import SUPPORTED_LANGUAGE
|
||||
from Furious.Action.Routing import BUILTIN_ROUTING
|
||||
from Furious.Utility.Constants import SYSTEM_LANGUAGE
|
||||
from Furious.Utility.Utility import Switch
|
||||
|
||||
@@ -22,7 +23,9 @@ class Settings:
|
||||
|
||||
value = QtCore.QSettings().value(settings.name)
|
||||
|
||||
if settings.protectedRange is None or value in settings.protectedRange:
|
||||
if value is not None and (
|
||||
settings.protectedRange is None or value in settings.protectedRange
|
||||
):
|
||||
return value
|
||||
|
||||
# Value not in protected range. Set to default
|
||||
@@ -55,7 +58,7 @@ SUPPORTED_SETTINGS = (
|
||||
# Connected last time or not
|
||||
Settings('Connect', Switch.RANGE),
|
||||
# User Routing option
|
||||
Settings('Routing'),
|
||||
Settings('Routing', default=BUILTIN_ROUTING[0]),
|
||||
# User Custom Routing object
|
||||
Settings('CustomRouting'),
|
||||
# User Configuration
|
||||
|
||||
Reference in New Issue
Block a user