]> gerrit.simantics Code Review - simantics/3d.git/commitdiff
Prevent editing null values 24/3024/1
authorMarko Luukkainen <marko.luukkainen@semantum.fi>
Wed, 17 Jul 2019 09:01:48 +0000 (12:01 +0300)
committerMarko Luukkainen <marko.luukkainen@semantum.fi>
Wed, 17 Jul 2019 09:01:48 +0000 (12:01 +0300)
* This is a temporary solution for Inline components that do not support
rotation

gitlab #13

Change-Id: Ibd948a2537a63c9775726a5b5bbe6a6d06c5f505

org.simantics.g3d/src/org/simantics/g3d/property/AnnotatedPropertyTabContributorFactory.java

index 21e773c1c82c2fdf4dbda2e91a3e59afdeb272ee..f5db540e81640a7082853e538e7aee28410219f8 100644 (file)
@@ -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