From: Marko Luukkainen Date: Wed, 17 Jul 2019 09:01:48 +0000 (+0300) Subject: Prevent editing null values X-Git-Tag: v1.43.0~247 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=9d4b97ae81002cf1183032b4316a7a582eafe849;p=simantics%2F3d.git Prevent editing null values * This is a temporary solution for Inline components that do not support rotation gitlab #13 Change-Id: Ibd948a2537a63c9775726a5b5bbe6a6d06c5f505 --- diff --git a/org.simantics.g3d/src/org/simantics/g3d/property/AnnotatedPropertyTabContributorFactory.java b/org.simantics.g3d/src/org/simantics/g3d/property/AnnotatedPropertyTabContributorFactory.java index 21e773c1..f5db540e 100644 --- a/org.simantics.g3d/src/org/simantics/g3d/property/AnnotatedPropertyTabContributorFactory.java +++ b/org.simantics.g3d/src/org/simantics/g3d/property/AnnotatedPropertyTabContributorFactory.java @@ -748,7 +748,11 @@ public class AnnotatedPropertyTabContributorFactory implements PropertyTabContri PropertyItem item = (PropertyItem)element; if (tab.getManipulator(item).getValueCount() <= index) return false; - return (item.setter != null); + if (item.setter == null) + return false; + if (getValue(element) == null) + return false; + return true; } @Override