Prevent editing of object mask type on existing mask (#11829)

This commit is contained in:
Josh Hawkins 2024-06-09 07:28:38 -05:00 committed by GitHub
parent f4dd3e44b6
commit 5f3c35209d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -156,10 +156,6 @@ export default function ObjectMaskEditPane({
? 1 ? 1
: 0; : 0;
if (editingMask) {
index = polygon.typeIndex;
}
// editing existing mask, not creating a new one // editing existing mask, not creating a new one
if (editingMask) { if (editingMask) {
index = polygon.typeIndex; index = polygon.typeIndex;
@ -308,6 +304,7 @@ export default function ObjectMaskEditPane({
<Select <Select
onValueChange={field.onChange} onValueChange={field.onChange}
defaultValue={field.value} defaultValue={field.value}
disabled={polygon.name.length != 0}
> >
<FormControl> <FormControl>
<SelectTrigger> <SelectTrigger>