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 incorrect minimum heigh check in multiline #88

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

Conversation

whisperchan
Copy link

The minimum height check by default assumes a
contained widget height of 1 line. Because it requires space for
at least two containing widgets this is set to 2.
Setting this internal should not be required by inheriting classes.
Instead the check should use the _contained_widget_height property.

Currently having contained widgets with a height > 1 and two or more values with
less than two times the space available will cause an infinite recursion loop.

The minimum height check by default assumes a 
contained widget height of 1 line. Because it requires space for
at least two containing widgets this is set to 2.
Setting this internal should not be required by inheriting classes.
Instead the check should use the _contained_widget_height property.

Currently having contained widgets with a height > 1 and two or more values with
less than two times the space available will cause an infinite recursion loop.
@whisperchan
Copy link
Author

whisperchan commented Oct 12, 2019

I've been looking at MultiLine after someone reported a bug in my application to me.
The way it is setup I'm assuming that it originally just were textfields for contained widgets. Because at least two need to exist. One for values and one for the MORE_LABEL.

Therefor the requirement to the height should be: Space for one contained widget and the more label. But currently the code assumes, I think, there are at least two widgets (one being the more label). Thus I changed the check to two times the size of the contained widget.

Rewriting it to one contained_widget + more_label would be the better (but more expensive) thing to do.

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