From 7ad500a5f970a295d0826b73e2fc529766d16c2f Mon Sep 17 00:00:00 2001 From: Chumva Date: Mon, 10 Jun 2019 15:38:47 +0300 Subject: [PATCH] Add rendering settings update after customization --- OsmAnd/src/net/osmand/plus/OsmandApplication.java | 1 + OsmAnd/src/net/osmand/plus/render/MapRenderRepositories.java | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/OsmandApplication.java b/OsmAnd/src/net/osmand/plus/OsmandApplication.java index e1c69f6e9e..11fc36601c 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandApplication.java +++ b/OsmAnd/src/net/osmand/plus/OsmandApplication.java @@ -281,6 +281,7 @@ public class OsmandApplication extends MultiDexApplication { public void setOsmandSettings(OsmandSettings osmandSettings) { //android.os.Process.killProcess(android.os.Process.myPid()); this.osmandSettings = osmandSettings; + resourceManager.getRenderer().updateSettings(); OsmandPlugin.initPlugins(this); } diff --git a/OsmAnd/src/net/osmand/plus/render/MapRenderRepositories.java b/OsmAnd/src/net/osmand/plus/render/MapRenderRepositories.java index 17b4da9d4b..5f5e63e700 100644 --- a/OsmAnd/src/net/osmand/plus/render/MapRenderRepositories.java +++ b/OsmAnd/src/net/osmand/plus/render/MapRenderRepositories.java @@ -154,6 +154,11 @@ public class MapRenderRepositories { return prevBmpLocation; } + public void updateSettings() { + prefs = context.getSettings(); + clearCache(); + } + public synchronized void closeConnection(String file) { LinkedHashMap cpfiles = new LinkedHashMap(files); BinaryMapIndexReader bmir = cpfiles.remove(file);