X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.g3d%2Fsrc%2Forg%2Fsimantics%2Fg3d%2Fproperty%2FAnnotatedPropertyTabContributorFactory.java;h=a3fca78bb4206dc18adafa617073919702042778;hb=aae56c70a404cb2198761325eaea81140947b6df;hp=21e773c1c82c2fdf4dbda2e91a3e59afdeb272ee;hpb=9c5be9fa9ff5fece5710b9f21bcafca58388899d;p=simantics%2F3d.git 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..a3fca78b 100644 --- a/org.simantics.g3d/src/org/simantics/g3d/property/AnnotatedPropertyTabContributorFactory.java +++ b/org.simantics.g3d/src/org/simantics/g3d/property/AnnotatedPropertyTabContributorFactory.java @@ -673,6 +673,8 @@ public class AnnotatedPropertyTabContributorFactory implements PropertyTabContri // } // } if (Thread.currentThread() == Display.getDefault().getThread()) { + if (viewer.getTable().isDisposed()) + return; if (DEBUG)System.out.println("Viewer refresh " + id); for (PropertyItem item : resolvedItems) if (!item.equals(selectedItem)) @@ -748,7 +750,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 @@ -793,7 +799,7 @@ public class AnnotatedPropertyTabContributorFactory implements PropertyTabContri if (DEBUG)System.err.println("CELL SET VALUE: " + element + " " + value); manipulator.setValue((String)value,index); viewer.refresh(item); - nodeMap.commit(); + nodeMap.commit("Set " + item.id + " value to " + value); }