trevorsandy / lpub3d

An LDraw™ editor for LEGO® style digital building instructions.
https://trevorsandy.github.io/lpub3d/
131 stars 19 forks source link

Inconsistent page loading and numbering #693

Closed trevorsandy closed 1 year ago

trevorsandy commented 1 year ago

Subject

Not always all pages are loaded/counted and then only some pages are displayed in the dropdown at the top of the header. After a "right click" and "Refrssh page image" all pages are displayed again.

For example, the following model file has 6 pages - 5 content pages plus a back cover-page:

0 FILE pyramid.ldr
0 Example Pyramid for Demonstration of LDRAW Library
0 Name: pyramid.ldr
0 Author: James Jessiman
0 !LPUB MULTI_STEP BEGIN
1 1 -40 -24 60 1 0 0 0 1 0 0 0 1 3001.dat
1 1 40 -24 60 1 0 0 0 1 0 0 0 1 3001.dat
1 1 60 -24 0 0 0 1 0 1 0 -1 0 0 3001.dat
1 1 40 -24 -60 1 0 0 0 1 0 0 0 1 3001.dat
1 1 -40 -24 -60 1 0 0 0 1 0 0 0 1 3001.dat
1 1 -60 -24 0 0 0 1 0 1 0 -1 0 0 3001.dat
0 STEP
1 16 -60 20 -40 0 0 1 0 1 0 -1 0 0 submodel-1.ldr
0 STEP
1 14 0 -72 20 1 0 0 0 1 0 0 0 1 3001.dat
1 14 0 -72 -20 1 0 0 0 1 0 0 0 1 3001.dat
0 STEP
0 !LPUB MULTI_STEP END
1 0 0 -96 0 1 0 0 0 1 0 0 0 1 3003.dat
0 STEP
0 !LPUB INSERT PAGE
0 !LPUB INSERT BOM
0 STEP
0 !LPUB INSERT COVER_PAGE BACK
0 NOFILE
0 FILE submodel-1.ldr
0 Name: submodel-1.ldr
0 Author: James Jessiman
1 19 -20 -48 40 1 0 0 0 1 0 0 0 1 3001.dat
1 19 40 -48 20 0 0 1 0 1 0 -1 0 0 3001.dat
0 STEP
1 19 20 -48 -40 1 0 0 0 1 0 0 0 1 3001.dat
1 19 -40 -48 -20 0 0 1 0 1 0 -1 0 0 3001.dat
0 NOFILE

...but a page count of 7 pages is displayed on the initial page load:

Numbering01

...however, the correct number of pages (6) is displayed on subsequent page loads:

Numbering02

Environment

Version of LPub3D - 2.4.6 Operating system - All

Expected behaviour

Page numbering and page display dropdown dialogue should be consistent across page loads

Actual behaviour

Inconsistent page loading and numbering across page loads

Solution

Fix it.

Cheers,

trevorsandy commented 1 year ago

This behaviour has been corrected.

Initial page load: Numbering03

Subsequent page loads: Numbering04

Cheers,