]> gitweb.fperrin.net Git - GpsPrune.git/blobdiff - tim/prune/load/xml/XmlFileLoader.java
Version 9, February 2010
[GpsPrune.git] / tim / prune / load / xml / XmlFileLoader.java
index 3f1b2eb6fed19246785cf41a883e75a5c4b7f476..7fa5ec1b80f8b1d693686dacb1cd2483709b1f89 100644 (file)
@@ -10,6 +10,7 @@ import org.xml.sax.helpers.DefaultHandler;
 import tim.prune.App;
 import tim.prune.I18nManager;
 import tim.prune.data.Altitude;
+import tim.prune.data.SourceInfo;
 
 /**
  * Class for handling loading of Xml files, and passing the
@@ -76,8 +77,10 @@ public class XmlFileLoader extends DefaultHandler implements Runnable
                        else
                        {
                                // Pass information back to app
+                               SourceInfo sourceInfo = new SourceInfo(_file,
+                                       (_handler instanceof GpxHandler?SourceInfo.FILE_TYPE.GPX:SourceInfo.FILE_TYPE.KML));
                                _app.informDataLoaded(_handler.getFieldArray(), _handler.getDataArray(),
-                                       Altitude.Format.METRES, _file.getName());
+                                       Altitude.Format.METRES, sourceInfo);
                        }
                }
                catch (Exception e)