aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSammysHP <sven@sammyshp.de>2011-09-15 13:08:55 +0200
committerSammysHP <sven@sammyshp.de>2011-09-15 13:19:02 +0200
commitc80b5c68692a19e87fc8c9807d056ff39a90583d (patch)
treeda87b601b398cfdff4c4b2b3beaeb21e76e05e5b /src
parentba37d7511c3f8d8c56e9d9f77478efd76f9ce116 (diff)
downloadcgeo-c80b5c68692a19e87fc8c9807d056ff39a90583d.zip
cgeo-c80b5c68692a19e87fc8c9807d056ff39a90583d.tar.gz
cgeo-c80b5c68692a19e87fc8c9807d056ff39a90583d.tar.bz2
Fix #347 (wrong context-menu in cgeocaches)
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))) {