Revision 42692
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.fmap.control/src/main/java/org/gvsig/fmap/mapcontrol/dal/feature/swing/table/GeometryWKTCellEditor.java | ||
---|---|---|
35 | 35 |
import javax.swing.DefaultCellEditor; |
36 | 36 |
import javax.swing.JOptionPane; |
37 | 37 |
import javax.swing.JTable; |
38 |
import org.apache.commons.lang3.StringUtils; |
|
38 | 39 |
|
39 | 40 |
import org.gvsig.fmap.geom.Geometry; |
40 | 41 |
import org.gvsig.fmap.geom.GeometryLocator; |
... | ... | |
87 | 88 |
public Object getCellEditorValue() { |
88 | 89 |
String wkt = (String) super.getCellEditorValue(); |
89 | 90 |
try { |
90 |
return geomManager.createFrom(wkt); |
|
91 |
if( wkt==null || StringUtils.isEmpty(wkt.trim()) ) { |
|
92 |
return null; |
|
93 |
} |
|
94 |
return geomManager.createFrom(wkt); |
|
91 | 95 |
} catch (Exception ex) { |
92 | 96 |
throw new WKTToGeometryException(wkt, ex); |
93 | 97 |
} |
Also available in: Unified diff