Removing typed config functions in Helper.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
2995b2271a
commit
b33e1329db
11 changed files with 53 additions and 149 deletions
|
@ -53,11 +53,11 @@ export class BoolSetting extends Setting {
|
|||
}
|
||||
|
||||
value() {
|
||||
return Helper.getSettingBool(this.nameInConfig)
|
||||
return Helper.getSetting(this.nameInConfig)
|
||||
}
|
||||
|
||||
set(value) {
|
||||
Helper.setSettingBool(this.nameInConfig, value)
|
||||
Helper.setSetting(this.nameInConfig, value === true)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -69,11 +69,11 @@ export class NumberSetting extends Setting {
|
|||
}
|
||||
|
||||
value() {
|
||||
return Helper.getSettingInt(this.nameInConfig)
|
||||
return Helper.getSetting(this.nameInConfig)
|
||||
}
|
||||
|
||||
set(value) {
|
||||
Helper.setSettingInt(this.nameInConfig, value)
|
||||
Helper.setSetting(this.nameInConfig, +value)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -84,11 +84,11 @@ export class EnumIntSetting extends Setting {
|
|||
}
|
||||
|
||||
value() {
|
||||
return Helper.getSettingInt(this.nameInConfig)
|
||||
return Helper.getSetting(this.nameInConfig)
|
||||
}
|
||||
|
||||
set(value) {
|
||||
Helper.setSettingInt(this.nameInConfig, value)
|
||||
Helper.setSetting(this.nameInConfig, +value)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -131,6 +131,6 @@ export class StringSetting extends Setting {
|
|||
}
|
||||
|
||||
set(value) {
|
||||
Helper.setSetting(this.nameInConfig, value)
|
||||
Helper.setSetting(this.nameInConfig, ""+value)
|
||||
}
|
||||
}
|
|
@ -37,7 +37,7 @@ const XMIN = new NumberSetting(
|
|||
qsTranslate("Settings", "Min X"),
|
||||
"default_graph.xmin",
|
||||
"xmin",
|
||||
() => Helper.getSettingBool("default_graph.logscalex") ? 1e-100 : -Infinity
|
||||
() => Helper.getSetting("default_graph.logscalex") ? 1e-100 : -Infinity
|
||||
)
|
||||
|
||||
const YMAX = new NumberSetting(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue