Removing value from the grid lags the program

easily reproducible bug

when you have grid setup menu open, remove a value from cell so that it will be blank or set the value to 1, then click the “down” arrow that is right next to a box, the program then sets up grid width or height to 0.01 and the program lags because it renders so much stuff at once, this does not happen when you click the “up” arrow only “down”, also the lag still happens even if the value in the other box is set to nothing when the grid wasn’t even suppose to render