trevorsandy / lpub3d

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

Part list annotation style gets resetted #716

Closed Dark-Noir closed 1 year ago

Dark-Noir commented 1 year ago

Subject

Parts list annotations style can be changed, but it is not applied and is resetted, after re-opening the preferences.

Environment

Configuration

Logs

Screenshots

Preconditions

  1. Fresh *.zip extracted

Steps to reproduce

  1. Start LPub3D.exe
  2. Select your LDraw lib
  3. Open a *.ldr file
  4. Go to "Configuration -> Building instructions Setup... -> Parts List Setup... -> Annotations"
  5. Check "Display Part List (PLI) Annotation From Source"
  6. Go to "Styles" sub menu
  7. Change the "Style" to anything else than "None"
  8. Close the menu with "OK"

Expected behavior

Actual behavior

Additional info

It is also not possible to change the part annotation border directly by selecting it, the drop down element resets every time (see screenshot 2).

Workaround

None found

Solution suggestion

Fix ^^

trevorsandy commented 1 year ago

Thank you for reporting this behaviour.

The functionality is not designed to behave as you have described.

  1. Change the "Style" to anything else than "None"

Performing this action will not Change the selected style. As stated in the label - Select Style to Edit, your selection will simply enable the specified style so you can perform your changes to that style. If no changes are made (step 8. above), nothing will be applied. You can click the WhatsThis Help - the ? at the top right of the dialogue window - and then click the respective dialogue item to display details as shown in the first screenshot below.

It is also not possible to change the part annotation border directly by selecting it, the drop down element resets every time (see screenshot 2).

If your above remark pertains to using the annotation context (right-click) menu, it is should be noted that modifying a meta command from the context menu will not create a GLOBAL command. Having said that. I was not able to reproduce the behaviour you described on v2.4.6-r144 or the latest DevOps build.

For me the behaviour is as expected:

Using WhatsThis Help Annotation716_A

Enable Square style and change the border colour Annotation716_B Annotation716_C

The changed colour is applied to the PLI and also persists as you can see when the setup dialogue is reopened. Annotation716_D

Change the LOCAL border colour using the annotation context menu Annotation716_E Annotation716_F Annotation716_G

The new LOCAL border colour is persisted as you can see when you reopen the annotation context menu. Annotation716_H

However, the GLOBAL border colour is not changed as you can see when you reopen the Parts List Setup dialogue. Annotation716_I

Cheers,

trevorsandy commented 1 year ago

Addendum: Build Instruction Setup menu item meta commands can be sensitive to the currently loaded step/page. For example, if your currently loaded page is a multi-step page, meta command changes will be applied to the MULTI_STEP instance of the meta command - if the command has a unique instance for MULTI_STEP, CALLOUT etc... Meta commands that only have a single !LPUB instance are not affected.

To illustrate, if you are currently on a multi-step page and you change the assembly model scale to 0.9, the affected meta command is 0 !LPUB MULTI_STEP ASSEM MODEL_SCALE GLOBAL 0.9000. However if you are on a single-step page, the affected meta command will be 0 !LPUB ASSEM MODEL_SCALE GLOBAL 0.9000.

Cheers,