Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parsing of macros that contain NN as well as other commands #752

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rmc47
Copy link

@rmc47 rmc47 commented Oct 27, 2021

If a macro contains an NN command as well as others, since 26c29e1, that macro would be parsed as null by RDMacroEvent::load.

This PR ignores any null commands within a macro (is that the right behaviour or should they be preserved?), but tracks whether the macro contains only null commands. If so, it clears and returns false as before. Where the macro contains other commands as well as the NN, the other commands are loaded correctly, and only the NN is ignored.

To reproduce:

  • Create a new macro cart in RDLibrary
  • Add one regular line, like PN 1!
  • Add a second line, NN ! (the default value if you double-click --- End of cart --- and click OK)
  • Save the cart
  • Edit the cart again

Expected behaviour: at least PN 1! is still visible; executing macro works.
Behaviour in v3.6.2: no lines (except --- End of cart---) are visible, and macro will not execute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant