Fixed Bug; Added Completer to tag search bar

Fixed a bug when closing DB connection dialog during startup causing an error later. A normal exit suffices.
dev
Peery 2 years ago
parent 7a41c675ec
commit 385bfebca3

@ -61,6 +61,9 @@ class ArtNetManager:
dialog.ui.port_line_edit.setText(str(prev_db_data["port"]))
db_data: dict = dialog.exec_()
if db_data is None:
logging.info("Dialog was closed without result! Exiting ...")
exit(0)
if len(db_data.keys()) == 0:
return
self.change_db_connection(host=db_data["host"], port=db_data["port"],

@ -90,6 +90,15 @@ class Window(QtWidgets.QMainWindow):
self.ui.description_edit.setReadOnly(False)
tags = self.__main.db_connection.search_fuzzy_tag("", all_if_empty=True)
result = []
for tag_name, tag_desc, tag_category in tags:
result.append(tag_name)
complete = QtWidgets.QCompleter(result)
complete.setCaseSensitivity(Qt.CaseInsensitive)
self.ui.tag_search_bar.setCompleter(complete)
self.on_tag_search_change()
self.center()

2
DB

@ -1 +1 @@
Subproject commit 6b3592e0b7114c3043816d0f28a1c092098a8354
Subproject commit 7a0b0dfc88e46f1ec31842a34c18d408f23f041d
Loading…
Cancel
Save