Page 1 of 1

Layout blocks - order

Posted: Tue Apr 15, 2025 9:54 am
by bambuko
Is there a way of deleting/editing of system created numbering order of layout blocks?
Adding/inserting additional layout blocks in an order that makes sense to the user throws out system numbering out of order...
Like so:
Screenshot_20250415_094402.png
Screenshot_20250415_094402.png (35.37 KiB) Viewed 15292 times
I would like it to look like so (regardless of internal/system ordering):
change.png
change.png (56.83 KiB) Viewed 15292 times

Code: Select all

QCAD Professional
Version: 3.32.2.0 (3.32.2)
Internet: QCAD.org
Build Date: Feb 20 2025
Revision: 6616def
Qt Version: 5.14.2
Architecture: x86_64
Compiler: gcc 5.4.0

Re: Layout blocks - order

Posted: Wed Apr 16, 2025 4:17 am
by CVH
Hi,

Adding a Layout Block is a QCAD Pro feature and these are not readily documented.
But it won't be rocket science ... :wink:

The single mandatory Layout in a new file is called Layout1(*Paper Space) with order 0.
On creation of a new Layout an order is assigned that is 1 higher as what already exist in the drawing at that time.
The addition (*Paper Space) is also increased 1 up starting from -1 (="") to (*Paper Space0) and cannot be edited.

In the example below I added 'Layout2' and 'Layout3' chronologically but changed their list order to 0 afterwards.
:arrow: Clearly NOT sorted on Layout name nor on Paper Space number.
I can not easily retrieve the object handles but assume that they are also chronological upon creation.

LayoutOrderZero.png
All Tab order = Zero
LayoutOrderZero.png (9.64 KiB) Viewed 14749 times

Certain Blocks are not listed and filtered out in BlockList.js.
Finally traced back to a sorting function 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.
Below I forced a reverse order with unique values 0-2.

LayoutOrderInverse.png
Inverse Tab orders
LayoutOrderInverse.png (11.78 KiB) Viewed 14749 times

HowTo:
- Select the Layout in the Block List.
- Rename Block (BN) or hit the [a|b] button.
- Adapt the list order and make it chronological as for your needs.

It may be an idea to file a feature request to sort Layouts with the same 'tab order' alphanumerical like other Blocks ...
... As stated and intended in the code.

Regards,
CVH

Re: Layout blocks - order

Posted: Wed Apr 16, 2025 8:54 am
by bambuko
Thank you,
CVH wrote:
Wed Apr 16, 2025 4:17 am
It may be an idea to file a feature request to sort Layouts with the same 'tab order' alphanumerical like other Blocks ...
... As stated and intended in the code...
so that sounds more like "bug report" (i.e. QCAD doesn't work like intended?) than "feature request" :P
where do I file feature request, please?

Re: Layout blocks - order

Posted: Wed Apr 16, 2025 12:27 pm
by CVH
bambuko wrote:
Wed Apr 16, 2025 8:54 am
so that sounds more like "bug report"
When you look at the code then there is nothing wrong with the current behavior.
But the note: sort by layout name or block name (ignoring * at start) implies that Layouts may still be sorted like normal Blocks.

Perhaps the intention was there but this code is never reached for Layout Blocks.
Hence 'Feature Request'.

Feature requests are also filed on QCAD Bugtracker.

Regards,
CVH

Re: Layout blocks - order

Posted: Wed Apr 16, 2025 12:41 pm
by bambuko
Thank you
https://www.ribbonsoft.com/bugtracker/
waiting to be approved

Re: Layout blocks - order

Posted: Wed Apr 16, 2025 1:22 pm
by CVH
bambuko wrote:
Wed Apr 16, 2025 12:41 pm
waiting to be approved
The last task that was added is FS#2661 and was fixed ... :roll:
No task related to 'Layout' or 'Layouts' and their list 'order' is still open or was closed before.

I don't understand the following: 'waiting to be approved'
Submitting a feature request or bug report as logged on user is instantaneously.
It is at Andrew's discretion what he does with it.

Regards,
CVH

Re: Layout blocks - order

Posted: Wed Apr 16, 2025 1:33 pm
by bambuko

Re: Layout blocks - order

Posted: Wed Apr 16, 2025 1:48 pm
by CVH
Voted it up to 1 vote. :wink:

Regards,
CVH

Re: Layout blocks - order

Posted: Wed Apr 16, 2025 1:55 pm
by bambuko
CVH wrote:
Wed Apr 16, 2025 1:22 pm
...I don't understand the following: 'waiting to be approved...
my registration required to be approved before I could log in...
thank you for up-voting it