fix(cfd): Verhindert das Verschwinden des Such-Icons bei Klick ohne Suchbegriff

This commit is contained in:
2025-08-13 23:06:50 +02:00
parent c1fe8b62e1
commit 24e8ed1dff

View File

@@ -35,7 +35,8 @@ class SearchManager:
"""
Activates the search entry or cancels an ongoing search.
If a search is running, it cancels it. Otherwise, it executes a new search.
If a search is running, it cancels it. Otherwise, it executes a new search
only if there is a search term present.
"""
if self.dialog.widget_manager.search_animation.running:
if self.dialog.search_thread and self.dialog.search_thread.is_alive():
@@ -44,7 +45,9 @@ class SearchManager:
self.dialog.widget_manager.search_status_label.config(
text=LocaleStrings.UI["cancel_search"])
else:
self.execute_search()
# Only execute search if there is text in the entry
if self.dialog.widget_manager.filename_entry.get().strip():
self.execute_search()
def show_search_bar(self, event: tk.Event) -> None:
"""