Author: sletellier Date: 2008-12-18 14:44:56 +0000 (Thu, 18 Dec 2008) New Revision: 1689 Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/CellUI.jaxx Log: Debug final ! Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/CellUI.jaxx =================================================================== --- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/CellUI.jaxx 2008-12-18 14:32:38 UTC (rev 1688) +++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/CellUI.jaxx 2008-12-18 14:44:56 UTC (rev 1689) @@ -63,7 +63,7 @@ import org.codelutin.topia.TopiaException; -protected IsisMapBean cellMap = new IsisMapBean(); +protected IsisMapBean cellMap = null; protected OpenMapToolPanel toolMap = new OpenMapToolPanel(); protected OMToolSet toolSet = new OMToolSet(); protected OpenMapEvents mapListener = null; @@ -92,17 +92,18 @@ Cell cell = action.getCell(); setBean((CellImpl) cell); jaxx.runtime.swing.Utils.fillComboBox(fieldCell,action.getFisheryRegion().getCell(), cell); + if (cellMap == null){ + cellMap = new IsisMapBean(); + cellMap.setSelectionMode(CellSelectionLayer.SINGLE_SELECTION); + cellMap.setActiveMouseMode(new SelectMouseMode()); + cellMap.setFisheryRegion(action.getFisheryRegion()); + toolSet.setupListeners(cellMap); + toolMap.add((Component)toolSet); + setMapListener(); + cellMapPanel.add(toolMap, BorderLayout.NORTH); + cellMapPanel.add(cellMap, BorderLayout.CENTER); + } - cellMap = new IsisMapBean(); - cellMap.setSelectionMode(CellSelectionLayer.SINGLE_SELECTION); - cellMap.setActiveMouseMode(new SelectMouseMode()); - cellMap.setFisheryRegion(action.getFisheryRegion()); - toolSet.setupListeners(cellMap); - toolMap.add((Component)toolSet); - setMapListener(); - cellMapPanel.add(toolMap, BorderLayout.NORTH); - cellMapPanel.add(cellMap, BorderLayout.CENTER); - if (cell != null){ cellMap.setSelectedCells(cell); }