← All bug reports

FS#2662Sort Layouts with the same 'tab order' alphanumerical like other Blocks

Type
Feature Request
Status
Assigned
Category
QCAD (main)
Severity
Very Low
Priority
Low
Reported version
3.32.2
Operating system
All
Reported
2025-04-16 by bambuko
Votes
1

Adding/inserting additional layout blocks in an order that makes sense to the user throws out system numbering out of order...
Unable to sort Layouts in alphanumerical order like other blocks.
Displaying Layout order number in the layout name is pointless since system cannot cope with non-chronological layouts.
Extract from the thread on the forum (linked below)

Finally traced back to a [url=https://github.com/qcad/qcad/blob/9965f5c6c29cc7419d26d37ebffe119d7511641b/src/core/RStorageBlockSort.cpp]sorting function[/url] called in line 247 (Current state):
- model space always first
- layouts always before other blocks
- sort among layouts by tab order
- sort by layout name or block name (ignoring * at start)
 :!: Notice that the last rule will never be reached when comparing 2 Layout objects with the same 'tab order'.
The third rule will return "false" anyway and things are left unsorted as they are queried from the document.

Meaning that we can force any listing order but only by editing the list order values.

Comments (2)

CVH 2025-04-16

Please denote Severity to 'Low' or 'very Low'.
It is not a critical issue that affects all users or makes QCAD crash.

The normal way to order Layouts in the Block List is by the Tab order property.
The issue only surfaces with equal Tab orders and those are set identical by you.

Regards,
CVH

bambuko 2025-04-16

all my blocks are ordered/grouped alphanumerically to make it easy for me to find what I need