diff options
Diffstat (limited to 'main/src')
| -rw-r--r-- | main/src/cgeo/geocaching/files/SimpleDirChooser.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/main/src/cgeo/geocaching/files/SimpleDirChooser.java b/main/src/cgeo/geocaching/files/SimpleDirChooser.java index 824173c..6b2366c 100644 --- a/main/src/cgeo/geocaching/files/SimpleDirChooser.java +++ b/main/src/cgeo/geocaching/files/SimpleDirChooser.java @@ -186,13 +186,12 @@ public class SimpleDirChooser extends AbstractListActivity { if (currentOption != lastOption) { currentOption.setChecked(true); lastPosition = position; - okButton.setEnabled(true); - okButton.setVisibility(View.VISIBLE); } else { lastPosition = -1; - okButton.setEnabled(false); - okButton.setVisibility(View.INVISIBLE); } + final boolean enabled = currentOption.isChecked() && !currentOption.getName().equals(PARENT_DIR); + okButton.setEnabled(enabled); + okButton.setVisibility(enabled ? View.VISIBLE : View.INVISIBLE); adapter.notifyDataSetChanged(); } } |
