aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cgeo/geocaching/cgeocaches.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/cgeo/geocaching/cgeocaches.java b/src/cgeo/geocaching/cgeocaches.java
index 9f670c0..0353420 100644
--- a/src/cgeo/geocaching/cgeocaches.java
+++ b/src/cgeo/geocaching/cgeocaches.java
@@ -546,6 +546,11 @@ public class cgeocaches extends AbstractListActivity {
*/
private boolean contextMenuMoveToList = false;
+ /**
+ * flag indicating whether we shall show the filter context menu
+ */
+ private boolean contextMenuShowFilter = false;
+
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -1010,11 +1015,15 @@ public class cgeocaches extends AbstractListActivity {
return true;
case SUBMENU_FILTER_TYPE:
selectedFilter = res.getString(R.string.caches_filter_type);
+ contextMenuShowFilter = true;
openContextMenu(getListView());
+ contextMenuShowFilter = false;
return false;
case SUBMENU_FILTER_SIZE:
selectedFilter = res.getString(R.string.caches_filter_size);
+ contextMenuShowFilter = true;
openContextMenu(getListView());
+ contextMenuShowFilter = false;
return false;
case MENU_FILTER_TRACKABLES:
setFilter(new cgFilterByTrackables(res.getString(R.string.caches_filter_track)));
@@ -1071,7 +1080,7 @@ public class cgeocaches extends AbstractListActivity {
Log.w(cgSettings.tag, "cgeocaches.onCreateContextMenu: " + e.toString());
}
- if ((adapterInfo == null || adapterInfo.position < 0) && selectedFilter != null) {
+ if ((adapterInfo == null || adapterInfo.position < 0 || contextMenuShowFilter) && selectedFilter != null) {
// Context menu opened by selecting an option on the filter submenu
if (selectedFilter.equals(res.getString(R.string.caches_filter_size))) {