From e134e47debad1d8ccda33771849dcfbbc5b48f01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Sat, 24 Mar 2018 17:25:49 +0100 Subject: [PATCH] HistoryManager: Clear logs TextView when nothing is selected --- gajim/history_manager.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gajim/history_manager.py b/gajim/history_manager.py index 90fcd1a02..6d85a4163 100644 --- a/gajim/history_manager.py +++ b/gajim/history_manager.py @@ -264,11 +264,10 @@ class HistoryManager: def on_jids_listview_selection_changed(self, widget, data=None): liststore, list_of_paths = self.jids_listview.get_selection()\ .get_selected_rows() - paths_len = len(list_of_paths) - if paths_len == 0: # nothing is selected - return - self.logs_liststore.clear() # clear the store + self.logs_liststore.clear() + if not list_of_paths: + return self.welcome_vbox.hide() self.search_results_scrolledwindow.hide()