branch feature/7075 updated (86c11dd -> 2740996)
This is an automated email from the git hooks/post-receive script. New change to branch feature/7075 in repository observe. See http://git.codelutin.com/observe.git from 86c11dd refs #7075 : passé le modèle des paniers a l'état modifier lors de l'application d'un autre template. new 2740996 refs #7075 : passé le modèle à l'état modifier lors de la modification de l'avançon. Enegitré l'avancon en cour de modification a l'enregistrement du schéma de palangre 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 2740996cdcf36afac0fe2f3097c555224593b619 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Wed May 6 17:27:22 2015 +0200 refs #7075 : passé le modèle à l'état modifier lors de la modification de l'avançon. Enegitré l'avancon en cour de modification a l'enregistrement du schéma de palangre Summary of changes: .../LonglineDetailCompositionUIHandler.java | 34 ++++++++++++++++------ 1 file changed, 25 insertions(+), 9 deletions(-) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@list.forge.codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/7075 in repository observe. See http://git.codelutin.com/observe.git commit 2740996cdcf36afac0fe2f3097c555224593b619 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Wed May 6 17:27:22 2015 +0200 refs #7075 : passé le modèle à l'état modifier lors de la modification de l'avançon. Enegitré l'avancon en cour de modification a l'enregistrement du schéma de palangre --- .../LonglineDetailCompositionUIHandler.java | 34 ++++++++++++++++------ 1 file changed, 25 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 ac01be8..c7ab282 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 @@ -107,7 +107,7 @@ public class LonglineDetailCompositionUIHandler extends ContentUIHandler<SetLong } }; - private final PropertyChangeListener branchlineDetailSaved = new PropertyChangeListener() { + private final PropertyChangeListener branchlineDetailChanged = new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { @@ -327,7 +327,7 @@ public class LonglineDetailCompositionUIHandler extends ContentUIHandler<SetLong this.validationHelper = new LonglineDetailCompositionUIValidationHelper(ui1, getDecoratorService()); - getBranchlineDetailUIModel().addPropertyChangeListener(BranchlineUIModel.PROPERTY_SAVED, branchlineDetailSaved); + getBranchlineDetailUIModel().addPropertyChangeListener(BranchlineUIModel.PROPERTY_SAVED, branchlineDetailChanged); { // init section templates table @@ -485,19 +485,33 @@ public class LonglineDetailCompositionUIHandler extends ContentUIHandler<SetLong DataSource dataSource, TopiaEntityBinder<SetLongline> binder) throws Exception { + BranchlineUI branchlineDetailUI = getUi().getBranchlineDetailUI(); + + boolean continueSave = true; + + if (getUi().getFishingOperationTabPane().getSelectedIndex() == 2) { - SectionsTableModel sectionsTableModel = getSectionsTableModel(); - SectionWithTemplate selectedSection = sectionsTableModel.getSelectedRow(); - if (selectedSection != null) { + BranchlineUIHandler branchlineUIHandler = branchlineDetailUI.getHandler(); - // flush selected section before save - flushSection(selectedSection); + continueSave = branchlineUIHandler.tryToQuit(); } - dataService.update(dataSource, null, bean, getUpdateExecutor()); + if (continueSave) { + + SectionsTableModel sectionsTableModel = getSectionsTableModel(); + SectionWithTemplate selectedSection = sectionsTableModel.getSelectedRow(); + if (selectedSection != null) { + + // flush selected section before save + flushSection(selectedSection); + + } + + dataService.update(dataSource, null, bean, getUpdateExecutor()); + } - return true; + return continueSave; } @Override @@ -1355,6 +1369,7 @@ public class LonglineDetailCompositionUIHandler extends ContentUIHandler<SetLong case 2: BranchlineUI branchlineDetailUI = getUi().getBranchlineDetailUI(); + branchlineDetailUI.getModel().removePropertyChangeListener(BranchlineUIModel.PROPERTY_MODIFIED, branchlineDetailChanged); branchlineDetailUI.edit(null); break; @@ -1391,6 +1406,7 @@ public class LonglineDetailCompositionUIHandler extends ContentUIHandler<SetLong // update branchline detail BranchlineUI branchlineDetailUI = getUi().getBranchlineDetailUI(); branchlineDetailUI.edit(branchline); + branchlineDetailUI.getModel().addPropertyChangeListener(BranchlineUIModel.PROPERTY_MODIFIED, branchlineDetailChanged); } -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@list.forge.codelutin.com>.
participants (1)
-
codelutin.com scm