From 8e536f31aa112b72c67485cccaa8239f376f7271 Mon Sep 17 00:00:00 2001 From: rakow Date: Wed, 3 Jan 2024 15:10:24 +0100 Subject: [PATCH] use config params from default context as default for new ones --- .../java/org/matsim/simwrapper/SimWrapperConfigGroup.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/contribs/simwrapper/src/main/java/org/matsim/simwrapper/SimWrapperConfigGroup.java b/contribs/simwrapper/src/main/java/org/matsim/simwrapper/SimWrapperConfigGroup.java index 180dc4d29ef..8c19b0ca769 100644 --- a/contribs/simwrapper/src/main/java/org/matsim/simwrapper/SimWrapperConfigGroup.java +++ b/contribs/simwrapper/src/main/java/org/matsim/simwrapper/SimWrapperConfigGroup.java @@ -45,9 +45,12 @@ public ContextParams get(String context) { if (!params.containsKey(context)) { ContextParams p = new ContextParams(); p.context = context; - if (!context.equals("")) { + if (!context.isEmpty()) { // Copy default params from the global config p.sampleSize = defaultParams().sampleSize; + p.shp = defaultParams().shp; + p.mapCenter = defaultParams().mapCenter; + p.mapZoomLevel = defaultParams().mapZoomLevel; } addParameterSet(p); return p;