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

NewPage with freeSpace extended #1648 #1653

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

2S-Software
Copy link

New parameter 'freeSpace' to the existing widget NewPage added, so that the page break is only executed if the free space is less than specified.

The default value of the new double parameter is Null, so that in this case a page break is always generated as before.

This PR solves the issue #1648.

@DavBfr
Copy link
Owner

DavBfr commented Apr 23, 2024

What would be the reason to have newPageNeeded in the toplevel Widget?
It could be part of NewPage only or in a mixin.

@2S-Software
Copy link
Author

What would be the reason to have newPageNeeded in the toplevel Widget?

I chose the generic way in the base class Widget so that other widgets can also control the space requirement or a page break.
From my point of view, you should avoid a type cast in MultiPage.

@DavBfr
Copy link
Owner

DavBfr commented Apr 23, 2024

But for backward compatibility, if someone created a method with this name it will break their app.

@2S-Software
Copy link
Author

2S-Software commented Apr 23, 2024

But for backward compatibility, if someone created a method with this name it will break their app.

I think the risk is low and would be easy to fix for the developer concerned. I believe the new options for other and new widgets are more important.

But your are the owner, you can decide...

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.

None yet

2 participants