aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/cgeowaypoint.java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/cgeo/geocaching/cgeowaypoint.java')
-rw-r--r--main/src/cgeo/geocaching/cgeowaypoint.java29
1 files changed, 15 insertions, 14 deletions
diff --git a/main/src/cgeo/geocaching/cgeowaypoint.java b/main/src/cgeo/geocaching/cgeowaypoint.java
index 697ffd0..e8aa770 100644
--- a/main/src/cgeo/geocaching/cgeowaypoint.java
+++ b/main/src/cgeo/geocaching/cgeowaypoint.java
@@ -217,21 +217,22 @@ public class cgeowaypoint extends AbstractActivity implements IObserver<IGeoData
@Override
public boolean onOptionsItemSelected(MenuItem item) {
- final int menuItem = item.getItemId();
- if (menuItem == MENU_ID_DEFAULT_NAVIGATION) {
- goDefaultNavigation(null);
- return true;
- } else if (menuItem == MENU_ID_CACHES_AROUND) {
- cachesAround();
- return true;
- } else if (menuItem == MENU_ID_OPEN_GEOCACHE) {
- goToGeocache();
- return true;
- } else if (menuItem == MENU_ID_NAVIGATION) {
- NavigationAppFactory.showNavigationMenu(app.currentGeo(), this, null, waypoint, null);
- return true;
+ switch (item.getItemId()) {
+ case MENU_ID_DEFAULT_NAVIGATION:
+ goDefaultNavigation(null);
+ return true;
+ case MENU_ID_CACHES_AROUND:
+ cachesAround();
+ return true;
+ case MENU_ID_OPEN_GEOCACHE:
+ goToGeocache();
+ return true;
+ case MENU_ID_NAVIGATION:
+ NavigationAppFactory.showNavigationMenu(app.currentGeo(), this, null, waypoint, null);
+ return true;
+ default:
+ return false;
}
- return false;
}
private void cachesAround() {