From 6da6fad62f6225c4a9d8ec3bf617da206ca32b12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Wingman?= Date: Fri, 6 Jan 2012 15:00:47 +0100 Subject: [PATCH] Make double-tap on directory open that directory when in dirselectmode --- kivy/uix/filechooser.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kivy/uix/filechooser.py b/kivy/uix/filechooser.py index e6fed9b73..d8ffc6f51 100644 --- a/kivy/uix/filechooser.py +++ b/kivy/uix/filechooser.py @@ -217,7 +217,10 @@ class FileChooserController(FloatLayout): if isdir(entry.path) and not self.dirselect: self.open_entry(entry) elif touch.is_double_tap: - self.dispatch('on_submit', self.selection, touch) + if self.dirselect and isdir(entry.path): + self.open_entry(entry) + else: + self.dispatch('on_submit', self.selection, touch) def open_entry(self, entry): try: