|
From: <de...@us...> - 2015-09-09 19:38:05
|
Revision: 9157
http://sourceforge.net/p/fudaa/svn/9157
Author: deniger
Date: 2015-09-09 19:38:02 +0000 (Wed, 09 Sep 2015)
Log Message:
-----------
CRUE-665
Modified Paths:
--------------
trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/emh/ModellingEMHBrancheTopComponent.java
Modified: trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/emh/ModellingEMHBrancheTopComponent.java
===================================================================
--- trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/emh/ModellingEMHBrancheTopComponent.java 2015-08-31 14:55:09 UTC (rev 9156)
+++ trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/emh/ModellingEMHBrancheTopComponent.java 2015-09-09 19:38:02 UTC (rev 9157)
@@ -2,6 +2,7 @@
import com.memoire.bu.BuGridLayout;
import java.awt.BorderLayout;
+import java.awt.EventQueue;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
@@ -12,6 +13,7 @@
import java.util.Collections;
import java.util.List;
import javax.swing.*;
+import org.apache.commons.lang.StringUtils;
import org.fudaa.ctulu.CtuluLog;
import org.fudaa.dodico.crue.common.Pair;
import org.fudaa.dodico.crue.edition.EditionChangeBranche;
@@ -25,6 +27,7 @@
import org.fudaa.fudaa.crue.common.helper.ToStringInternationalizableCellRenderer;
import org.fudaa.fudaa.crue.common.log.LogsDisplayer;
import org.fudaa.fudaa.crue.common.services.SysdocUrlBuilder;
+import org.fudaa.fudaa.crue.modelling.AbstractModellingTopComponent;
import org.fudaa.fudaa.crue.modelling.action.ModellingOpenListFrottementsOnBrancheNodeAction;
import org.fudaa.fudaa.crue.modelling.action.ModellingOpenListSectionsNodeAction;
import org.fudaa.fudaa.crue.modelling.services.EnumModification;
@@ -221,10 +224,15 @@
renameSection = optionRename.equals(DialogHelper.showQuestion(
getDisplayName(), dialogContent, new String[]{optionRename, optionNot}));
}
-
+ boolean isAmontAvalChanged = !StringUtils.equals(modifications.getNoeudAmont(), emh.getNoeudAmontNom()) || !StringUtils.equals(modifications.
+ getNoeudAval(), emh.
+ getNoeudAvalNom());
CtuluLog log = edition.changeBranche(emh, modifications, getCcm(), renameSection);
if (!log.containsErrorOrSevereError()) {
modellingScenarioModificationService.setScenarioModified(new ScenarioModificationEvent(EnumModification.EMH));
+ if (isAmontAvalChanged) {
+ modellingScenarioModificationService.setGeoLocModified();
+ }
setModified(false);
}
if (log.isNotEmpty()) {
@@ -248,7 +256,16 @@
cbType.setSelectedItem(branche.getBrancheType());
btSectionAmont.setText(branche.getSectionAmont().getEmhNom());
btSectionAval.setText(branche.getSectionAval().getEmhNom());
- udpdateSpecificCenter();
+ if (EventQueue.isDispatchThread()) {
+ udpdateSpecificCenter();
+ } else {
+ EventQueue.invokeLater(new Runnable() {
+ @Override
+ public void run() {
+ udpdateSpecificCenter();
+ }
+ });
+ }
}
/**
* le premier est le panel principal. le deuxieme est le panel spécifique au type de branche
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|