From 5d646c739614ac4ba60a99dd3045bf6851a29b6d Mon Sep 17 00:00:00 2001 From: PaulStets Date: Fri, 26 Jan 2018 13:43:11 +0200 Subject: [PATCH] Boat navigation is enabled with Nautical plugin --- .../osmand/plus/openseamapsplugin/NauticalMapsPlugin.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/openseamapsplugin/NauticalMapsPlugin.java b/OsmAnd/src/net/osmand/plus/openseamapsplugin/NauticalMapsPlugin.java index d2e3607fd1..2487b30cab 100644 --- a/OsmAnd/src/net/osmand/plus/openseamapsplugin/NauticalMapsPlugin.java +++ b/OsmAnd/src/net/osmand/plus/openseamapsplugin/NauticalMapsPlugin.java @@ -90,8 +90,9 @@ public class NauticalMapsPlugin extends OsmandPlugin { public void addBoatProfile(boolean flag) { Set selectedProfiles = new LinkedHashSet<>(ApplicationMode.values(app.getSettings())); - if((!selectedProfiles.contains(ApplicationMode.BOAT) && flag) || - ((selectedProfiles.contains(ApplicationMode.BOAT) && !flag))) { + boolean isBoatEnabled = selectedProfiles.contains(ApplicationMode.BOAT); + if((!isBoatEnabled && flag) || + ((isBoatEnabled && !flag))) { String s = app.getSettings().AVAILABLE_APP_MODES.get(); String currModes = flag ? s + ApplicationMode.BOAT.getStringKey() + "," : s.replace(ApplicationMode.BOAT.getStringKey() + ",", "");