mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2026-06-02 13:05:00 -06:00
Moved OnSettingChange after I add or remove selected vals to fix crashing issue.
This commit is contained in:
parent
f2980073a7
commit
5d6c9cb6bf
@ -753,7 +753,6 @@ class SettingsAdapter(
|
|||||||
val value = it.getValueAt(which)
|
val value = it.getValueAt(which)
|
||||||
if (value in it.selectedValues && !is_checked) {
|
if (value in it.selectedValues && !is_checked) {
|
||||||
it.removeSelectedValue(value ?: "")
|
it.removeSelectedValue(value ?: "")
|
||||||
fragmentView?.onSettingChanged()
|
|
||||||
} else {
|
} else {
|
||||||
it.addSelectedValue(value ?: "")
|
it.addSelectedValue(value ?: "")
|
||||||
}
|
}
|
||||||
@ -762,7 +761,6 @@ class SettingsAdapter(
|
|||||||
is AbstractMultiShortSetting -> {
|
is AbstractMultiShortSetting -> {
|
||||||
if (is_checked != it.selectValueIndices[which]) {
|
if (is_checked != it.selectValueIndices[which]) {
|
||||||
it.removeSelectedValue(it.getValueAt(which)?.toShort() ?: 1)
|
it.removeSelectedValue(it.getValueAt(which)?.toShort() ?: 1)
|
||||||
fragmentView?.onSettingChanged()
|
|
||||||
} else {
|
} else {
|
||||||
it.addSelectedValue(it.getValueAt(which)?.toShort() ?: 1)
|
it.addSelectedValue(it.getValueAt(which)?.toShort() ?: 1)
|
||||||
}
|
}
|
||||||
@ -771,8 +769,9 @@ class SettingsAdapter(
|
|||||||
else -> throw IllegalStateException("Unrecognized type used for StringMultiChoiceSetting!")
|
else -> throw IllegalStateException("Unrecognized type used for StringMultiChoiceSetting!")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fragmentView?.onSettingChanged()
|
||||||
fragmentView?.putSetting(setting as AbstractSetting)
|
fragmentView?.putSetting(setting as AbstractSetting)
|
||||||
//fragmentView.loadSettingsList()
|
fragmentView.loadSettingsList()
|
||||||
//closeDialog()
|
//closeDialog()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user