]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.g3d/src/org/simantics/g3d/property/AnnotatedPropertyTabContributorFactory.java
Mark undo pints when committing changes to the graph
[simantics/3d.git] / org.simantics.g3d / src / org / simantics / g3d / property / AnnotatedPropertyTabContributorFactory.java
index 21e773c1c82c2fdf4dbda2e91a3e59afdeb272ee..a3fca78bb4206dc18adafa617073919702042778 100644 (file)
@@ -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);
                        
                }