branch feature/8121 created (now 20120fd)
This is an automated email from the git hooks/post-receive script. New change to branch feature/8121 in repository tutti. See http://git.codelutin.com/tutti.git at 20120fd Bien calculer l'action corriger une espèce (See #8121) This branch includes the following new commits: new 20120fd Bien calculer l'action corriger une espèce (See #8121) 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 20120fd9b4d69cd70a1e9451d84184070e253551 Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Mar 14 17:15:24 2016 +0100 Bien calculer l'action corriger une espèce (See #8121) -- 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/8121 in repository tutti. See http://git.codelutin.com/tutti.git commit 20120fd9b4d69cd70a1e9451d84184070e253551 Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Mar 14 17:15:24 2016 +0100 Bien calculer l'action corriger une espèce (See #8121) --- .../operation/catches/species/SpeciesBatchRowModel.java | 17 +++++++++++++++++ .../catches/species/SpeciesBatchUIHandler.java | 8 +++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchRowModel.java b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchRowModel.java index 618a24c..7ef7daa 100644 --- a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchRowModel.java +++ b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchRowModel.java @@ -699,4 +699,21 @@ public class SpeciesBatchRowModel extends AbstractTuttiBeanUIModel<SpeciesBatch, } } + public boolean isContainsIndividualObservations() { + + boolean result = CollectionUtils.isNotEmpty(getIndividualObservation()); + + if (!result && !isChildBatchsEmpty()) { + + for (SpeciesBatchRowModel childRow : childBatch) { + result = childRow.isContainsIndividualObservations(); + if (result) { + break; + } + } + } + + return result; + + } } diff --git a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java index 87f3382..6001d8a 100644 --- a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java +++ b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/SpeciesBatchUIHandler.java @@ -542,8 +542,14 @@ public class SpeciesBatchUIHandler extends AbstractTuttiBatchTableUIHandler<Spec if (enableRename) { - // can rename if selected batch is a parent + // can rename if selected batch is a parent and none of his shell has individual observations enableRename = row.isBatchRoot(); + + if (enableRename) { + + enableRename = !row.isContainsIndividualObservations(); + + } } if (enableRemove) { -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm