HistoryManager: Clear logs TextView when nothing is selected

This commit is contained in:
Philipp Hörist 2018-03-24 17:25:49 +01:00
parent 058d3db1b0
commit e134e47deb
1 changed files with 3 additions and 4 deletions

View File

@ -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()