Boat navigation is enabled with Nautical plugin

This commit is contained in:
PaulStets 2018-01-26 13:46:32 +02:00
parent 5d646c7396
commit cae1baa6e5

View file

@ -91,8 +91,7 @@ public class NauticalMapsPlugin extends OsmandPlugin {
public void addBoatProfile(boolean flag) {
Set<ApplicationMode> selectedProfiles = new LinkedHashSet<>(ApplicationMode.values(app.getSettings()));
boolean isBoatEnabled = selectedProfiles.contains(ApplicationMode.BOAT);
if((!isBoatEnabled && flag) ||
((isBoatEnabled && !flag))) {
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() + ",", "");