Subversion Repositories eFlore/Applications.coel

Rev

Rev 1791 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1791 Rev 1793
Line 206... Line 206...
206
		} else if (nouvellesDonnees instanceof Information) {
206
		} else if (nouvellesDonnees instanceof Information) {
207
			Information info = (Information) nouvellesDonnees;
207
			Information info = (Information) nouvellesDonnees;
208
			if (info.getType().equals("maj_utilisateur")) {
208
			if (info.getType().equals("maj_utilisateur")) {
209
				gererEtatActivationBouton();
209
				gererEtatActivationBouton();
210
			} else if (info.getType().equals("modif_collection")) {
210
			} else if (info.getType().equals("modif_collection")) {
-
 
211
				// curieusement la suppression efface aussi l'index de l'élément
-
 
212
				// car elle redéclenche l'évenement de selection (on le stocke donc temporairement)
-
 
213
				int temporaire = indexElementSelectionne;
211
				if(collectionSelectionnee != null) {
214
				if(collectionSelectionnee != null) {
212
					store.remove(indexElementSelectionne);
215
					store.remove(collectionSelectionnee);
213
					collectionSelectionnee = null;
216
					collectionSelectionnee = null;
214
				}
217
				}
215
				Collection collecModifiee = (Collection)info.getDonnee(0);
218
				Collection collecModifiee = (Collection)info.getDonnee(0);
216
				// au cas ou le bouton appliquer aurait été cliqué avant de valider
219
				// au cas ou le bouton appliquer aurait été cliqué avant de valider
217
				store.remove(collecModifiee);
220
				store.remove(collecModifiee);
-
 
221
				indexElementSelectionne = temporaire;
218
				store.insert(collecModifiee, indexElementSelectionne);
222
				store.insert(collecModifiee, temporaire);
219
				collectionSelectionnee = collecModifiee;
223
				collectionSelectionnee = collecModifiee;
220
				int indexElementSelectionne = store.indexOf(collectionSelectionnee);
224
				int indexElementSelectionne = store.indexOf(collectionSelectionnee);
221
				grille.getSelectionModel().select(indexElementSelectionne, false);
225
				grille.getSelectionModel().select(indexElementSelectionne, false);
222
				grille.getView().focusRow(indexElementSelectionne);
226
				grille.getView().focusRow(indexElementSelectionne);
223
				clicListe(collecModifiee);
227
				clicListe(collectionSelectionnee);
224
			} else if (info.getType().equals("suppression_collection")) {
228
			} else if (info.getType().equals("suppression_collection")) {
225
				// Affichage d'un message d'information 
229
				// Affichage d'un message d'information 
226
				InfoLogger.display(i18nC.suppressionCollection(), info.toString().replaceAll("\n", "<br />"));
230
				InfoLogger.display(i18nC.suppressionCollection(), info.toString().replaceAll("\n", "<br />"));
Line 227... Line 231...
227
 
231