cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1417048 - in /cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor: ObjEntityAttributeTab.java ObjEntityTab.java
Date Tue, 04 Dec 2012 17:33:27 GMT
Author: aadamchik
Date: Tue Dec  4 17:33:26 2012
New Revision: 1417048

URL: http://svn.apache.org/viewvc?rev=1417048&view=rev
Log:
CAY-1727 Modeler thinks entity is using inheritance when it doesn't

patch by idrabenia

Modified:
    cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityAttributeTab.java
    cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityTab.java

Modified: cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityAttributeTab.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityAttributeTab.java?rev=1417048&r1=1417047&r2=1417048&view=diff
==============================================================================
--- cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityAttributeTab.java
(original)
+++ cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityAttributeTab.java
Tue Dec  4 17:33:26 2012
@@ -389,6 +389,11 @@ public class ObjEntityAttributeTab exten
     }
 
     public void objEntityAdded(EntityEvent e) {
+        if (e.getSource() == this) {
+            return;
+        }
+
+        this.rebuildTable((ObjEntity) e.getEntity());
     }
 
     public void objEntityRemoved(EntityEvent e) {

Modified: cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityTab.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityTab.java?rev=1417048&r1=1417047&r2=1417048&view=diff
==============================================================================
--- cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityTab.java
(original)
+++ cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/ObjEntityTab.java
Tue Dec  4 17:33:26 2012
@@ -471,7 +471,9 @@ public class ObjEntityTab extends JPanel
         dbModel.setSelectedItem(entity.getDbEntity());
         dbEntityCombo.setRenderer(CellRenderers.entityListRendererWithIcons(map));
         dbEntityCombo.setModel(dbModel);
-        dbEntityCombo.setEnabled(entity.getSuperClassName() == null);
+
+        boolean isUsedInheritance = entity.getSuperEntity() != null;
+        dbEntityCombo.setEnabled(!isUsedInheritance);
 
         // toggle visibilty and editability rules
         



Mime
View raw message