This is an automated email from the git hooks/post-receive script. New change to branch feature/7996 in repository tutti. See http://git.codelutin.com/tutti.git at eedea01 on ne pousse que les heures et les minutes quand on appelle set...Time (fixes #7996) This branch includes the following new commits: new eedea01 on ne pousse que les heures et les minutes quand on appelle set...Time (fixes #7996) 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 eedea0177e85d7b112e79ccf1ffa46328a4335e7 Author: Kevin Morin <morin@codelutin.com> Date: Mon Feb 22 13:20:28 2016 +0100 on ne pousse que les heures et les minutes quand on appelle set...Time (fixes #7996) -- 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/7996 in repository tutti. See http://git.codelutin.com/tutti.git commit eedea0177e85d7b112e79ccf1ffa46328a4335e7 Author: Kevin Morin <morin@codelutin.com> Date: Mon Feb 22 13:20:28 2016 +0100 on ne pousse que les heures et les minutes quand on appelle set...Time (fixes #7996) --- .../operation/EditFishingOperationUIHandler.java | 2 +- .../operation/EditFishingOperationUIModel.java | 20 ++++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUIHandler.java b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUIHandler.java index 0087073..12cc4d3 100644 --- a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUIHandler.java +++ b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUIHandler.java @@ -522,7 +522,7 @@ public class EditFishingOperationUIHandler extends AbstractTuttiTabContainerUIHa listenModelModifiy(vesselUseFeatureModel); setCustomTab(2, vesselUseFeatureModel); - // listen when id becones empty or not toupdate cancel action and button + // listen when id becomes empty or not to update cancel action and button getModel().addPropertyChangeListener( EditFishingOperationUIModel.PROPERTY_ID, new PropertyChangeListener() { diff --git a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUIModel.java b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUIModel.java index 38282ad..b649bc1 100644 --- a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUIModel.java +++ b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/EditFishingOperationUIModel.java @@ -822,16 +822,24 @@ public class EditFishingOperationUIModel extends AbstractTuttiBeanUIModel<Fishin //------------------------------------------------------------------------// public void setGearShootingStartTime(Date gearShootingStartDate) { - Object oldValue = getGearShootingStartDate(); - if (oldValue != null) { - setGearShootingStartDate(gearShootingStartDate); + Date currentGearShootingStartDate = getGearShootingStartDate(); + if (currentGearShootingStartDate != null && gearShootingStartDate != null) { + Calendar currentCalendar = DateUtil.getDefaultCalendar(currentGearShootingStartDate); + Calendar timeCalendar = DateUtil.getDefaultCalendar(gearShootingStartDate); + currentCalendar.set(Calendar.HOUR_OF_DAY, timeCalendar.get(Calendar.HOUR_OF_DAY)); + currentCalendar.set(Calendar.MINUTE, timeCalendar.get(Calendar.MINUTE)); + setGearShootingStartDate(currentCalendar.getTime()); } } public void setGearShootingEndTime(Date gearShootingEndDate) { - Object oldValue = getGearShootingEndDate(); - if (oldValue != null) { - setGearShootingEndDate(gearShootingEndDate); + Date currentGearShootingEndDate = getGearShootingEndDate(); + if (currentGearShootingEndDate != null && gearShootingEndDate != null) { + Calendar currentCalendar = DateUtil.getDefaultCalendar(currentGearShootingEndDate); + Calendar timeCalendar = DateUtil.getDefaultCalendar(gearShootingEndDate); + currentCalendar.set(Calendar.HOUR_OF_DAY, timeCalendar.get(Calendar.HOUR_OF_DAY)); + currentCalendar.set(Calendar.MINUTE, timeCalendar.get(Calendar.MINUTE)); + setGearShootingEndDate(currentCalendar.getTime()); } } -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm