diff options
author | Marcus Lundblad <ml@dfupdate.se> | 2022-11-27 22:16:15 +0100 |
---|---|---|
committer | Marcus Lundblad <ml@dfupdate.se> | 2022-11-28 23:33:56 +0100 |
commit | 722ae1287ff46625d4b122c3a2d88d3e2ad7e881 (patch) | |
tree | 73973f468d493a4ed09f18d7e9422b167a7bb18d | |
parent | 70dd2480d0a948690cfbd916a563e79b998cf1c3 (diff) | |
download | gnome-maps-722ae1287ff46625d4b122c3a2d88d3e2ad7e881.tar.gz |
application: Pass layers as a GListStore from argumentswip/mlundblad/fix-open-layers-commandline
When passing shape layer files on the command line pass
them in a GListStore to mapView.openShapeLayers().
-rw-r--r-- | src/application.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/application.js b/src/application.js index 41fb76b3..b0099891 100644 --- a/src/application.js +++ b/src/application.js @@ -219,7 +219,13 @@ export class Application extends Adw.Application { let mapsURI = uri.replace(/\//g, ''); this._openMapsUri(mapsURI); } else { - this._mainWindow.mapView.openShapeLayers(files); + let list = new Gio.ListStore(Gio.File.Gtype); + + for (let i = 0; i < files.length; i++) { + list.insert(i, files[i]); + } + + this._mainWindow.mapView.openShapeLayers(list); } } |