feat(file-explorer): add file selection on double-click
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
This commit is contained in:
@ -227,6 +227,10 @@ class FileExplorer(QDialog):
|
|||||||
# Открываем директорию
|
# Открываем директорию
|
||||||
self.current_path = os.path.normpath(full_path)
|
self.current_path = os.path.normpath(full_path)
|
||||||
self.update_file_list()
|
self.update_file_list()
|
||||||
|
elif not self.directory_only:
|
||||||
|
# Выбираем файл, если directory_only=False
|
||||||
|
self.file_signal.file_selected.emit(os.path.normpath(full_path))
|
||||||
|
self.accept()
|
||||||
else:
|
else:
|
||||||
logger.debug("Double-clicked item is not a directory, ignoring: %s", full_path)
|
logger.debug("Double-clicked item is not a directory, ignoring: %s", full_path)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
Reference in New Issue
Block a user