From 0079c13bf7c1e2004ef1dddf2e4b2e15bb81256f Mon Sep 17 00:00:00 2001 From: Debanjum Singh Solanky Date: Thu, 18 Aug 2022 18:29:55 +0300 Subject: [PATCH] Set input-directories in config for image search type on Desktop GUI - Issue Fix configuring image search from Desktop GUI. It was broken before. The Desktop GUI was updating input-files field under content-type > image. This field is not used for image search. So image search couldn't be configured from the Desktop GUI - Fix - Set input-directories when field of search type image is set from GUI - Otherwise set input-files field in config --- src/interface/desktop/main_window.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/interface/desktop/main_window.py b/src/interface/desktop/main_window.py index fbe0fa00..cf4168dd 100644 --- a/src/interface/desktop/main_window.py +++ b/src/interface/desktop/main_window.py @@ -185,7 +185,10 @@ class MainWindow(QtWidgets.QMainWindow): default_search_config = self.get_default_config(search_type = child.search_type) self.new_config['content-type'][child.search_type.value] = merge_dicts(current_search_config, default_search_config) elif isinstance(child, FileBrowser) and child.search_type in self.new_config['content-type']: - self.new_config['content-type'][child.search_type.value]['input-files'] = child.getPaths() if child.getPaths() != [] else None + if child.search_type.value == SearchType.Image: + self.new_config['content-type'][child.search_type.value]['input-directories'] = child.getPaths() if child.getPaths() != [] else None + else: + self.new_config['content-type'][child.search_type.value]['input-files'] = child.getPaths() if child.getPaths() != [] else None def update_processor_settings(self): "Update config with conversation settings from UI"