You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by nt...@apache.org on 2017/12/04 07:01:22 UTC
cayenne git commit: CAY-2384 Modeler: Visualization issue after an
undo action for a deleted ObjRelationship
Repository: cayenne
Updated Branches:
refs/heads/STABLE-4.0 a34b9bb48 -> 7cd30b821
CAY-2384 Modeler: Visualization issue after an undo action for a deleted ObjRelationship
Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/7cd30b82
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/7cd30b82
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/7cd30b82
Branch: refs/heads/STABLE-4.0
Commit: 7cd30b82100e289b0febbcc4fb0749221da48a53
Parents: a34b9bb
Author: Nikita Timofeev <st...@gmail.com>
Authored: Mon Dec 4 10:01:16 2017 +0300
Committer: Nikita Timofeev <st...@gmail.com>
Committed: Mon Dec 4 10:01:16 2017 +0300
----------------------------------------------------------------------
docs/doc/src/main/resources/RELEASE-NOTES.txt | 1 +
.../cayenne/modeler/undo/RemoveRelationshipUndoableEdit.java | 7 +++++++
2 files changed, 8 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cayenne/blob/7cd30b82/docs/doc/src/main/resources/RELEASE-NOTES.txt
----------------------------------------------------------------------
diff --git a/docs/doc/src/main/resources/RELEASE-NOTES.txt b/docs/doc/src/main/resources/RELEASE-NOTES.txt
index e315ab9..f79a402 100644
--- a/docs/doc/src/main/resources/RELEASE-NOTES.txt
+++ b/docs/doc/src/main/resources/RELEASE-NOTES.txt
@@ -22,6 +22,7 @@ CAY-2368 ColumnSelect: Property.self() translates into wrong SQL code
CAY-2370 ValueObjectType for byte[] fails lookup
CAY-2379 Modeler: Visualization issue after an undo action for a deleted ObjAttribute
CAY-2382 Lack of synchronization in DataContext serialization
+CAY-2384 Modeler: Visualization issue after an undo action for a deleted ObjRelationship
----------------------------------
Release: 4.0.B2
http://git-wip-us.apache.org/repos/asf/cayenne/blob/7cd30b82/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);
+ }
}