From a5ed04e44010e2fa4d199f7127cd4918bdc44e3c Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Mon, 28 Oct 2024 13:56:13 +0100 Subject: [PATCH] Browser: Fix "(none)" not getting displayed on selection of dummy items. --- browser.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/browser.py b/browser.py index 91355ed..57dc8ab 100755 --- a/browser.py +++ b/browser.py @@ -1171,7 +1171,6 @@ class MainWindow(Gtk.Window): selected_item = self.gallery.selected_item display_name = '(none)' if selected_item: - display_name = selected_item.full_path if isinstance(selected_item, ImgItem): params_strs = [f'{k}: {getattr(selected_item, k.lower())}' for k in GEN_PARAMS] @@ -1179,6 +1178,9 @@ class MainWindow(Gtk.Window): bookmarked = 'BOOKMARK' if selected_item.bookmarked else '' self.metadata.set_text( '\n'.join([title, bookmarked] + params_strs)) + display_name = selected_item.full_path + elif isinstance(selected_item, DirItem): + display_name = selected_item.full_path total = len([s for s in self.gallery.slots if isinstance(s.item, (DirItem, ImgItem))]) n_selected = self.gallery.selected_idx + 1 -- 2.30.2