diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js index 2d3a17a62..12a4aed9b 100644 --- a/js/ui/iconGrid.js +++ b/js/ui/iconGrid.js @@ -468,6 +468,12 @@ var IconGridLayout = GObject.registerClass({ this._unlinkItem(item); }); + // Adjust the page indexes of items after this page + for (const itemData of this._items.values()) { + if (itemData.pageIndex > pageIndex) + itemData.pageIndex--; + } + this._pages.splice(pageIndex, 1); this.emit('pages-changed'); }