[?][BUG][ED] Grid size of "1" is available and doesn't get saved

Started by chroda, July 24, 2025, 09:42:41 AM

Previous topic - Next topic

Proxima and 1 Guest are viewing this topic.

chroda

Hi Will,
Steps to reproduce:

Launch SLXEditor 2.8.8
Tools
tick 'Snap to Grid'
(tick 'Snap to Grid' <=> 'Snap-to-Grid amount in pixels' ticked)
Settings
Snap Pieces to Grid
GridSize  '1'
Choose grid color 'Blue'  (Blue for example, any color except invisible)
Save And Close
File/Exit

When exiting and relaunching SLXEditor, 'Snap to Grid' in unticked and GridSize returns to its default value of '8' (note that this does not happen if GridSize is different from '1', any GridSize value other than '1' is maintained as well as the grid color and 'Snap to Grid' is always ticked).

This can be annoying if you're working with a full background (blue, for example) because you have to redefine GridSize each time you work.

When activating 'Snap to Grid' AND 'Snap-to-Grid amount in pixels' with GridSize '1', is there a solution so that when SLXEditor is exited, the Gridsize '1' setting with 'Snap to Grid' ticked are maintained when SLXEditor is restarted?

WillLem

Well, the bug here is really that a grid size of "1" is available at all.

If the grid size is 1, it's the same difference as simply not having the grid active. Modifiers aside, if you select and drag a piece with the grid switched off, the piece will move in 1px increments anyway. Setting a 1px grid, then, actually has no effect.

To put it another way, the Editor will always snap pieces to a minimum grid of 1px, whilst providing a variable grid size specifically for the purpose of making the minimum grid something other than (and necessarily higher than) 1px.

The next Editor update will set the minimum variable grid size to 2px, which is really as it should be.

Addressed in commit dc9bd91.

chroda

QuoteThe next Editor update will set the minimum variable grid size to 2px, which is really as it should be.

OK, i understand, but...

For me, size 1 grid allowed me to have a uniform background (without grid) in a color other than invisible (black), and that's what mattered to me rather than the size of the grid itself.

Will the upcoming change allow me to have a uniform background (without grid) in blue, yellow, midnight or another color other than the standard black background?

Proxima

You can already do that; create a background image that's a single colour, and place it in the "backgrounds" folder inside the style folder. See the ones in proxima_tile for examples. For good performance, it's better for the image to be relatively large, not 1x1.