branch develop updated (4f633f8 -> 10d996b)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository tutti. See http://git.codelutin.com/tutti.git from 4f633f8 tri des double listes à l'ouverture du protocole new 10d996b ne pas ajouter de ligne de mensuration en rafale quand on est en mode de recopie 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 10d996b70b1958ec7f21c2125d86855437a7de60 Author: Kevin Morin <morin@codelutin.com> Date: Wed Mar 9 17:32:00 2016 +0100 ne pas ajouter de ligne de mensuration en rafale quand on est en mode de recopie Summary of changes: .../actions/ApplySpeciesFrequencyRafaleAction.java | 65 +++++++++++----------- 1 file changed, 34 insertions(+), 31 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 develop in repository tutti. See http://git.codelutin.com/tutti.git commit 10d996b70b1958ec7f21c2125d86855437a7de60 Author: Kevin Morin <morin@codelutin.com> Date: Wed Mar 9 17:32:00 2016 +0100 ne pas ajouter de ligne de mensuration en rafale quand on est en mode de recopie --- .../actions/ApplySpeciesFrequencyRafaleAction.java | 65 +++++++++++----------- 1 file changed, 34 insertions(+), 31 deletions(-) diff --git a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/actions/ApplySpeciesFrequencyRafaleAction.java b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/actions/ApplySpeciesFrequencyRafaleAction.java index 03d2d39..1c8e2a9 100644 --- a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/actions/ApplySpeciesFrequencyRafaleAction.java +++ b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/frequency/actions/ApplySpeciesFrequencyRafaleAction.java @@ -70,58 +70,61 @@ public class ApplySpeciesFrequencyRafaleAction { if (log.isDebugEnabled()) { log.debug("Will apply rafale step: " + step); } + SpeciesFrequencyUIModel model = ui.getModel(); SpeciesFrequencyUIHandler handler = ui.getHandler(); + float aroundLengthStep = model.getLengthStep(step); - SpeciesFrequencyTableModel tableModel = handler.getTableModel(); + if (model.isCopyIndividualObservationNothing()) { - Map<Float, SpeciesFrequencyRowModel> rowsByStep = model.getRowCache(); + SpeciesFrequencyTableModel tableModel = handler.getTableModel(); - float aroundLengthStep = model.getLengthStep(step); + Map<Float, SpeciesFrequencyRowModel> rowsByStep = model.getRowCache(); - SpeciesFrequencyRowModel row = rowsByStep.get(aroundLengthStep); + SpeciesFrequencyRowModel row = rowsByStep.get(aroundLengthStep); - int rowIndex; + int rowIndex; - if (row != null) { + if (row != null) { - // increments current row - Integer number = row.getNumber(); - row.setNumber((number == null ? 0 : number) + 1); - rowIndex = tableModel.updateRow(row); + // increments current row + Integer number = row.getNumber(); + row.setNumber((number == null ? 0 : number) + 1); + rowIndex = tableModel.updateRow(row); - } else { + } else { - // create a new row + // create a new row - row = tableModel.createNewRow(); - row.setLengthStep(aroundLengthStep); - row.setNumber(1); - row.setValid(handler.isRowValid(row)); + row = tableModel.createNewRow(); + row.setLengthStep(aroundLengthStep); + row.setNumber(1); + row.setValid(handler.isRowValid(row)); - // get new index - List<Float> steps = Lists.newArrayList(rowsByStep.keySet()); - steps.add(aroundLengthStep); + // get new index + List<Float> steps = Lists.newArrayList(rowsByStep.keySet()); + steps.add(aroundLengthStep); - Collections.sort(steps); + Collections.sort(steps); - rowIndex = steps.indexOf(aroundLengthStep); + rowIndex = steps.indexOf(aroundLengthStep); - tableModel.addNewRow(rowIndex, row); - } - - int totalNumber = model.computeTotalNumber(); - model.setTotalNumber(totalNumber); + tableModel.addNewRow(rowIndex, row); + } - ui.getTable().scrollRowToVisible(rowIndex); + int totalNumber = model.computeTotalNumber(); + model.setTotalNumber(totalNumber); - if (fromIchtyometer) { + ui.getTable().scrollRowToVisible(rowIndex); + + if (fromIchtyometer) { - String unit = model.getLengthStepCaracteristicUnit(); - handler.showInformationMessage(t("tutti.editSpeciesFrequencies.addMeasure", step, aroundLengthStep, unit)); + String unit = model.getLengthStepCaracteristicUnit(); + handler.showInformationMessage(t("tutti.editSpeciesFrequencies.addMeasure", step, aroundLengthStep, unit)); - soundEngine.beepOnIchtyometerDataReception(unit, aroundLengthStep); + soundEngine.beepOnIchtyometerDataReception(unit, aroundLengthStep); + } } JXTable logsTable = ui.getLogsTable(); -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm