This is an automated email from the git hooks/post-receive script. New change to branch feature/7591_Correction_migration_entites_d_un_parent_a_un_autre in repository observe. See https://gitlab.nuiton.org/codelutin/observe.git from 88fc833 Fix move multiple entities from a parent node to another : an open entity has to be closed new 1fd5431 Fix specific trip move from a program to another (need to close previous program and open the targeted one) The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 1fd543170f096cbc24644a858dc8431d7a51047e Author: Samuel Maisonneuve <maisonneuve@codelutin.com> Date: Tue Aug 2 17:26:49 2016 +0200 Fix specific trip move from a program to another (need to close previous program and open the targeted one) refs #7591 Summary of changes: .../ui/tree/actions/ChangeActivityRouteActionListener.java | 2 +- .../observe/ui/tree/actions/ChangeActivityTripActionListener.java | 2 +- .../observe/ui/tree/actions/ChangeRouteTripActionListener.java | 2 +- .../observe/ui/tree/actions/ChangeTripProgramActionListener.java | 8 ++++++-- .../fr/ird/observe/ui/tree/actions/NodeChangeActionListener.java | 4 ++-- 5 files changed, 11 insertions(+), 7 deletions(-) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/7591_Correction_migration_entites_d_un_parent_a_un_autre in repository observe. See https://gitlab.nuiton.org/codelutin/observe.git commit 1fd543170f096cbc24644a858dc8431d7a51047e Author: Samuel Maisonneuve <maisonneuve@codelutin.com> Date: Tue Aug 2 17:26:49 2016 +0200 Fix specific trip move from a program to another (need to close previous program and open the targeted one) refs #7591 --- .../ui/tree/actions/ChangeActivityRouteActionListener.java | 2 +- .../observe/ui/tree/actions/ChangeActivityTripActionListener.java | 2 +- .../observe/ui/tree/actions/ChangeRouteTripActionListener.java | 2 +- .../observe/ui/tree/actions/ChangeTripProgramActionListener.java | 8 ++++++-- .../fr/ird/observe/ui/tree/actions/NodeChangeActionListener.java | 4 ++-- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/observe-application-swing/src/main/java/fr/ird/observe/ui/tree/actions/ChangeActivityRouteActionListener.java b/observe-application-swing/src/main/java/fr/ird/observe/ui/tree/actions/ChangeActivityRouteActionListener.java index 6287d15..9326ea6 100644 --- a/observe-application-swing/src/main/java/fr/ird/observe/ui/tree/actions/ChangeActivityRouteActionListener.java +++ b/observe-application-swing/src/main/java/fr/ird/observe/ui/tree/actions/ChangeActivityRouteActionListener.java @@ -72,7 +72,7 @@ public class ChangeActivityRouteActionListener extends NodeChangeActionListener } @Override - protected int moveNodeToParent(String nodeId, String parentNodeId) { + protected int moveNodeToParent(String nodeId, String parentNodeId, String oldParentNodeId) { int position; ObserveSwingApplicationContext applicationContext = ObserveSwingApplicationContext.get(); diff --git a/observe-application-swing/src/main/java/fr/ird/observe/ui/tree/actions/ChangeActivityTripActionListener.java b/observe-application-swing/src/main/java/fr/ird/observe/ui/tree/actions/ChangeActivityTripActionListener.java index e24f9ea..46737cb 100644 --- a/observe-application-swing/src/main/java/fr/ird/observe/ui/tree/actions/ChangeActivityTripActionListener.java +++ b/observe-application-swing/src/main/java/fr/ird/observe/ui/tree/actions/ChangeActivityTripActionListener.java @@ -72,7 +72,7 @@ public class ChangeActivityTripActionListener extends NodeChangeActionListener { } @Override - protected int moveNodeToParent(String nodeId, String parentNodeId) { + protected int moveNodeToParent(String nodeId, String parentNodeId, String oldParentNodeId) { int position; ObserveSwingApplicationContext applicationContext = ObserveSwingApplicationContext.get(); diff --git a/observe-application-swing/src/main/java/fr/ird/observe/ui/tree/actions/ChangeRouteTripActionListener.java b/observe-application-swing/src/main/java/fr/ird/observe/ui/tree/actions/ChangeRouteTripActionListener.java index 3843988..0d83df9 100644 --- a/observe-application-swing/src/main/java/fr/ird/observe/ui/tree/actions/ChangeRouteTripActionListener.java +++ b/observe-application-swing/src/main/java/fr/ird/observe/ui/tree/actions/ChangeRouteTripActionListener.java @@ -72,7 +72,7 @@ public class ChangeRouteTripActionListener extends NodeChangeActionListener { } @Override - protected int moveNodeToParent(String nodeId, String parentNodeId) { + protected int moveNodeToParent(String nodeId, String parentNodeId, String oldParentNodeId) { int position; ObserveSwingApplicationContext applicationContext = ObserveSwingApplicationContext.get(); diff --git a/observe-application-swing/src/main/java/fr/ird/observe/ui/tree/actions/ChangeTripProgramActionListener.java b/observe-application-swing/src/main/java/fr/ird/observe/ui/tree/actions/ChangeTripProgramActionListener.java index 101736d..1c44592 100644 --- a/observe-application-swing/src/main/java/fr/ird/observe/ui/tree/actions/ChangeTripProgramActionListener.java +++ b/observe-application-swing/src/main/java/fr/ird/observe/ui/tree/actions/ChangeTripProgramActionListener.java @@ -53,7 +53,7 @@ public class ChangeTripProgramActionListener extends NodeChangeActionListener { @Override protected void closeNode(String tripId) { - // Don't do anything : trip should stay open when being transfered + // Don't do anything : trip should stay open when being transferred } @Override @@ -67,7 +67,7 @@ public class ChangeTripProgramActionListener extends NodeChangeActionListener { } @Override - protected int moveNodeToParent(String nodeId, String parentNodeId) { + protected int moveNodeToParent(String nodeId, String parentNodeId, String oldParentNodeId) { int position; ObserveSwingApplicationContext applicationContext = ObserveSwingApplicationContext.get(); @@ -81,6 +81,10 @@ public class ChangeTripProgramActionListener extends NodeChangeActionListener { position = service.moveTripSeineToProgram(nodeId, parentNodeId); } + // Close old program and open new program + applicationContext.getOpenDataManager().closeProgram(oldParentNodeId); + applicationContext.getOpenDataManager().openProgram(parentNodeId); + return position; } } diff --git a/observe-application-swing/src/main/java/fr/ird/observe/ui/tree/actions/NodeChangeActionListener.java b/observe-application-swing/src/main/java/fr/ird/observe/ui/tree/actions/NodeChangeActionListener.java index 188e6f5..fd6ce8c 100644 --- a/observe-application-swing/src/main/java/fr/ird/observe/ui/tree/actions/NodeChangeActionListener.java +++ b/observe-application-swing/src/main/java/fr/ird/observe/ui/tree/actions/NodeChangeActionListener.java @@ -71,7 +71,7 @@ public abstract class NodeChangeActionListener implements ActionListener { closeNode(node.getId()); - int position = moveNodeToParent(nodeId, parentNodeId); + int position = moveNodeToParent(nodeId, parentNodeId, oldParentNode.getId()); treeHelper.selectNode(newParentNode); @@ -103,5 +103,5 @@ public abstract class NodeChangeActionListener implements ActionListener { protected abstract ObserveNode getNewParentNode(ObserveNode grandParentNode, String parentNodeId); - protected abstract int moveNodeToParent(String nodeId, String parentNodeId); + protected abstract int moveNodeToParent(String nodeId, String parentNodeId, String oldParentNodeId); } -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm