cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject [1/2] cayenne git commit: Added method focusObjEntity(ObjEntity objEntity) in RemoveRelationshipUndoableEdit to fix CAY-2384
Date Mon, 04 Dec 2017 06:58:08 GMT
Repository: cayenne
Updated Branches:
  refs/heads/master 201ccc2ab -> ed8577421


Added method focusObjEntity(ObjEntity objEntity) in RemoveRelationshipUndoableEdit to fix
CAY-2384


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/6c2d490d
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/6c2d490d
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/6c2d490d

Branch: refs/heads/master
Commit: 6c2d490de4920082774f01e076a63042d4292d88
Parents: 201ccc2
Author: Emerson Castaneda <emecas@users.noreply.github.com>
Authored: Fri Dec 1 15:23:50 2017 -0500
Committer: Emerson Castaneda <emecas@users.noreply.github.com>
Committed: Fri Dec 1 15:23:50 2017 -0500

----------------------------------------------------------------------
 .../cayenne/modeler/undo/RemoveRelationshipUndoableEdit.java  | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/6c2d490d/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/undo/RemoveRelationshipUndoableEdit.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/undo/RemoveRelationshipUndoableEdit.java
b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/undo/RemoveRelationshipUndoableEdit.java
index 6f6802b..d915f0b 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/undo/RemoveRelationshipUndoableEdit.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/undo/RemoveRelationshipUndoableEdit.java
@@ -26,6 +26,7 @@ import org.apache.cayenne.map.DbRelationship;
 import org.apache.cayenne.map.ObjEntity;
 import org.apache.cayenne.map.ObjRelationship;
 import org.apache.cayenne.modeler.action.CreateRelationshipAction;
+import org.apache.cayenne.modeler.action.DbEntityCounterpartAction;
 import org.apache.cayenne.modeler.action.RemoveRelationshipAction;
 
 public class RemoveRelationshipUndoableEdit extends CayenneUndoableEdit {
@@ -78,6 +79,7 @@ public class RemoveRelationshipUndoableEdit extends CayenneUndoableEdit
{
             for (ObjRelationship r : rels) {
                 action.createObjRelationship(objEntity, r);
             }
+            focusObjEntity(objEntity);
         }
         else {
             for (DbRelationship dr : dbRels) {
@@ -85,4 +87,9 @@ public class RemoveRelationshipUndoableEdit extends CayenneUndoableEdit
{
             }
         }
     }
+    
+    private void focusObjEntity(ObjEntity objEntity){
+        actionManager.getAction(DbEntityCounterpartAction.class)
+                .viewCounterpartEntity(objEntity);
+    }
 }


Mime
View raw message