Fix crash while dragging bookmark group to another grid (#1062)

Co-authored-by: slprime <31038811+slprime@users.noreply.github.com>
This commit is contained in:
Ressedandslprime authored and GitHub committed 2026-10-05 20:07:52 +03:00
1 parent 2844ea35bc
commit 1b3b495fec
2 files changed
+3 -2

No files matched your search

@@ -572,7 +572,7 @@ public class BookmarkPanel extends PanelWidget<BookmarkGrid> {
return;
} else if (this.sortableGroup != null) {
final int overRowIndex = grid.getRowIndex(mousey);
final int overRowIndex = Math.min(grid.getRowIndex(mousey), grid.getRows() - 1);
if (overRowIndex >= 0 && this.sortableGroup.groupId != this.grid.getRowGroupId(overRowIndex)) {
this.grid.moveGroup(this.sortableGroup, overRowIndex);
@@ -1105,7 +1105,7 @@ public class BookmarkPanel extends PanelWidget<BookmarkGrid> {
}
if (super.onMouseWheel(shift, mousex, mousey)) {
final int overRowIndex = grid.getRowIndex(mousey);
final int overRowIndex = Math.min(grid.getRowIndex(mousey), grid.getRows() - 1);
if (this.sortableGroup != null && overRowIndex >= 0
&& this.sortableGroup.groupId != this.grid.getRowGroupId(overRowIndex)) {
@@ -799,6 +799,7 @@ public class BookmarkGrid extends ItemsGrid<BookmarksGridSlot, BookmarkGrid.Book
sortableGroup.groupId = groupId;
this.onItemsChanged();
this.getMask();// force generate grid
overGroupId = getRowGroupId(overRowIndex);
}
if (sortableGroup.groupId == overGroupId) {