fix(uidesigner): suppress exceptions thrown while editing attribute values (closes #873)

This commit is contained in:
Akash Yadav
2023-03-19 23:01:16 +05:30
parent 4df38dd984
commit 111a15d7b0
@@ -93,7 +93,12 @@ class AttrValueEditorFragment : Fragment() {
val value = binding.attrValue.text.toString()
attr.value = value
view.applyAttribute(attr.copyAttr(value = value))
try {
view.applyAttribute(attr.copyAttr(value = value))
} catch (e: Exception) {
// When the user is editing the attribute value, it is always invalid and cannot be
// resolved. Exceptions may be thrown while parsing the value which should be ignored
}
}
textView.setText(attr.value)