Clone
1
aligning_items
ispyisail edited this page 2026-09-27 22:31:59 +13:00

Aligning items: putting symbols back on the grid

Wires in QElectroTech run straight when the terminals at both ends line up, and terminals line up when their symbols sit on the grid. A symbol that is even a few pixels off the grid gives a bent or stepped wire.

Symbols leave the grid more easily than you might think:

  • Alt+arrow moves a selection by 1 pixel (see Mouse modifiers, §6), so a few presses leave it between grid points.
  • Ctrl while dragging places freely, ignoring the grid.
  • Projects made with older versions, or with a different grid setting, may already contain symbols off the grid.

In the example projects that ship with QElectroTech, 508 of 3,678 placed symbols (14 %) are off the grid.

Until now nothing put them back: you had to drag each symbol by eye until it happened to land on a grid point. This page covers the commands that do it for you. They were proposed in discussion #1069 and are built one pull request at a time.

Menu names are given in French, as QElectroTech shows them until the translations are updated, with an English gloss in italics.

Command What it does Pull request
Snap to grid puts the selected items back on the grid #1073
Align, distribute, straighten wires line symbols up, space them evenly, straighten the wires between them planned in discussion #1069, not built yet

Snap to grid

Status: pending. This section describes PR #1073, not yet merged. Nothing here works until that lands — check the PR before trying any of this against your own build. This section will drop this notice once it does.

Using it

  1. Select the items to fix. Ctrl+A selects everything on the folio, which is the quickest way to tidy a whole page.
  2. Choose Édition ▸ Aligner ▸ Aligner sur la grille (Edit ▸ Align ▸ Snap to grid). The same command is in the right-click menu of the selection, and in command search (Ctrl+Shift+M, type "grille").

Each selected item moves to the nearest grid point, and the status bar says what happened:

Status bar Meaning
3 objet(s) remis sur la grille 3 items were off the grid and have been moved
La sélection est déjà sur la grille nothing needed moving; no undo step is added
(1 objet(s) verrouillé(s) laissé(s) en place) added when locked items were in the selection; they were not moved

One undo step (Ctrl+Z) puts every item back where it was.

Which items move, and to which grid

Item Snaps to
Symbols the folio grid, by the symbol's origin point: exactly where dragging it would have dropped it
Pictures the folio grid
Free texts the text grid, the finer step set under Affichage ▸ Grille des textes (View ▸ Text grid), so a text you placed on a finer step is not pulled onto the coarser folio grid
Shapes (lines, rectangles, polygons) not moved: a shape is several points, and no single one is the obvious one to snap
Locked items not moved
Wires follow their symbols, as they do when you drag

Items already on the grid stay exactly where they are.

Things worth knowing

  • Half a step rounds up. A symbol exactly half a grid step off (5 px on the default 10 px grid) goes to the next grid point, so "back on the grid" is not always "back where it was before the nudge".
  • Holding Ctrl makes no difference. Unlike dragging, where Ctrl means "ignore the grid", this command always snaps to the grid, so it still works if you give it a shortcut that includes Ctrl.
  • No default shortcut. You can assign one under Configurer QElectroTech ▸ Raccourcis (Settings ▸ Shortcuts); the command is listed in the Éditeur de schémas group.
  • The grid is the folio's own grid. If you changed the grid size in the preferences, symbols snap to that size.
  • A symbol whose terminals are off the grid inside the symbol itself still gives bent wires after snapping. That is a problem in the symbol, not its position; fix it in the element editor.

See also