From 8f4923db6ac2471ad625b5bbb98c3580521ea381 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Sat, 7 Mar 2026 10:45:39 -0800 Subject: [PATCH] GridView: get current grid from carousel --- src/Views/GridView.vala | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Views/GridView.vala b/src/Views/GridView.vala index bdc89d68..0ee2c571 100644 --- a/src/Views/GridView.vala +++ b/src/Views/GridView.vala @@ -12,7 +12,6 @@ public class Slingshot.Widgets.Grid : Gtk.Box { public uint columns; } - private Gtk.Grid current_grid; private Gee.HashMap grids; private Hdy.Carousel paginator; private Page page; @@ -66,7 +65,6 @@ public class Slingshot.Widgets.Grid : Gtk.Box { } paginator.scroll_to (grid); - current_grid = grid; refocus (); } } @@ -171,7 +169,8 @@ public class Slingshot.Widgets.Grid : Gtk.Box { if (col < 1 || col > page.columns || row < 1 || row > page.rows) { return null; } else { - return current_grid.get_child_at ((int)col - 1, (int)row - 1); + var grid = (Gtk.Grid) paginator.get_children ().nth_data ((int) paginator.get_position ()); + return grid.get_child_at ((int)col - 1, (int)row - 1); } }