aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/maps
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/cgeo/geocaching/maps')
-rw-r--r--main/src/cgeo/geocaching/maps/CGeoMap.java11
-rw-r--r--main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapView.java2
2 files changed, 6 insertions, 7 deletions
diff --git a/main/src/cgeo/geocaching/maps/CGeoMap.java b/main/src/cgeo/geocaching/maps/CGeoMap.java
index 4f003a5..6062469 100644
--- a/main/src/cgeo/geocaching/maps/CGeoMap.java
+++ b/main/src/cgeo/geocaching/maps/CGeoMap.java
@@ -747,19 +747,18 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
final File[] themeFiles = Settings.getMapThemeFiles();
String currentTheme = StringUtils.EMPTY;
- int currentItem = 0;
- if (StringUtils.isNotEmpty(Settings.getCustomRenderThemeFile())) {
- File currentThemeFile = new File(Settings.getCustomRenderThemeFile());
+ String currentThemePath = Settings.getCustomRenderThemeFilePath();
+ if (StringUtils.isNotEmpty(currentThemePath)) {
+ File currentThemeFile = new File(currentThemePath);
currentTheme = currentThemeFile.getName();
}
- int index = 0;
+ int currentItem = 0;
List<String> names = new ArrayList<String>();
names.add(res.getString(R.string.map_theme_builtin));
for (File file : themeFiles) {
- index++;
if (currentTheme.equalsIgnoreCase(file.getName())) {
- currentItem = index;
+ currentItem = names.size();
}
names.add(file.getName());
}
diff --git a/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapView.java b/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapView.java
index 40b0f11..9e570c4 100644
--- a/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapView.java
+++ b/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapView.java
@@ -235,7 +235,7 @@ public class MapsforgeMapView extends MapView implements MapViewImpl {
@Override
public void setMapTheme() {
- String customRenderTheme = Settings.getCustomRenderThemeFile();
+ String customRenderTheme = Settings.getCustomRenderThemeFilePath();
if (!StringUtils.isEmpty(customRenderTheme)) {
try {
setRenderTheme(new File(customRenderTheme));