Fixed issue with selections on grid reflow

This commit is contained in:
Sumner Evans
2019-08-29 07:02:37 -06:00
parent ec0c35521e
commit 4b569703bb

View File

@@ -27,6 +27,7 @@ class CoverArtGrid(Gtk.ScrolledWindow):
# This is the master list.
self.list_store = Gio.ListStore()
self.selected_list_store_index = None
self.items_per_row = 4
overlay = Gtk.Overlay()
@@ -206,6 +207,11 @@ class CoverArtGrid(Gtk.ScrolledWindow):
for _ in range(top_diff):
del self.list_store_top[-1]
if self.selected_list_store_index:
self.grid_top.select_child(
self.grid_top.get_child_at_index(
self.selected_list_store_index))
# Virtual Methods
# =========================================================================
def get_header_text(self, item) -> str: