visibility fix

This commit is contained in:
Serghei Borovetchi authored and Jason Mitchell committed 2022-02-17 18:45:26 -08:00
1 parent db6e3d33ca
commit 1e93f719fe
4 files changed
+27 -14

No files matched your search

+6 -10
View File
@@ -91,18 +91,14 @@ public class ItemsGrid
public void setGridSize(int mleft, int mtop, int w, int h)
{
//I don't like this big condition
if (marginLeft != mleft || marginTop != mtop || width != w || height != h) {
marginLeft = mleft;
marginTop = mtop;
marginLeft = mleft;
marginTop = mtop;
width = Math.max(0, w);
height = Math.max(0, h);
width = Math.max(0, w);
height = Math.max(0, h);
columns = width / SLOT_SIZE;
rows = height / SLOT_SIZE;
}
columns = width / SLOT_SIZE;
rows = height / SLOT_SIZE;
}