This is an automated email from the git hooks/post-receive script. New commit to branch feature/7017 in repository observe. See http://git.codelutin.com/observe.git commit 2bbe067e43f30144284409c45cab76e9682dae12 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Mon May 4 17:24:38 2015 +0200 demander l'enregistrement du detail de l'avançon modifié avant l'enregistrement de la composition de la palangre --- .../LonglineDetailCompositionUIHandler.java | 33 ++++++++++++++++------ 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/observe-swing/src/main/java/fr/ird/observe/ui/content/impl/longline/LonglineDetailCompositionUIHandler.java b/observe-swing/src/main/java/fr/ird/observe/ui/content/impl/longline/LonglineDetailCompositionUIHandler.java index 9433d66..0a5416a 100644 --- a/observe-swing/src/main/java/fr/ird/observe/ui/content/impl/longline/LonglineDetailCompositionUIHandler.java +++ b/observe-swing/src/main/java/fr/ird/observe/ui/content/impl/longline/LonglineDetailCompositionUIHandler.java @@ -473,22 +473,37 @@ public class LonglineDetailCompositionUIHandler extends ContentUIHandler<SetLong @Override protected boolean doSave(SetLongline bean) { - SectionsTableModel sectionsTableModel = getSectionsTableModel(); - SectionWithTemplate selectedSection = sectionsTableModel.getSelectedRow(); + BranchlineUI branchlineDetailUI = getUi().getBranchlineDetailUI(); + + boolean continueSave = true; - if (selectedSection != null) { + if (getUi().getFishingOperationTabPane().getSelectedIndex() == 2) { - // flush selected section before save - flushSection(selectedSection); + BranchlineUIHandler branchlineUIHandler = branchlineDetailUI.getHandler(); + + continueSave = branchlineUIHandler.tryToQuit(); } - List<SectionWithTemplate> sections = sectionsTableModel.getNotEmptyData(); + if (continueSave) { - LonglineDetailCompositionService service = getService(LonglineDetailCompositionService.class); - service.save(bean, sections); + SectionsTableModel sectionsTableModel = getSectionsTableModel(); + SectionWithTemplate selectedSection = sectionsTableModel.getSelectedRow(); + + if (selectedSection != null) { + + // flush selected section before save + flushSection(selectedSection); + + } + + List<SectionWithTemplate> sections = sectionsTableModel.getNotEmptyData(); + + LonglineDetailCompositionService service = getService(LonglineDetailCompositionService.class); + service.save(bean, sections); + } - return true; + return continueSave; } -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@list.forge.codelutin.com>.