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
ENH: property if DrawingArea clips children #4473
ENH: property if DrawingArea clips children #4473
Conversation
cf #4466 |
Add proprety `clip_children` to provide user interface if DrawingArea tries to clip it's children.
fd8a41b
to
7c3c98b
Compare
👍 Seems sensible to me. However, I would prefer if the |
I don't feel strongly about this so it up to you |
@clip_children.setter | ||
def clip_children(self, val): | ||
self._clip_children = bool(val) | ||
self.stale = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is only stale if the state changes, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but there are only a few checks anywhere else. This problem will either be solved if we go with a managed attributes meta-class (i.e. traitlets) or slowly as it annoys people.
ping @WeatherGod |
Looks good to me now |
ENH: property if DrawingArea clips children
Add proprety
clip_children
to provide user interface if DrawingArea tries to clip it's children.Did not include get/set methods and used property instead. I hope going forward we will drop the
set/get_*
methods in favor of some sort of descriptor based solution.getp
/setp
should probably be updated to look for properties first and then for getter/setter methods. That can be added to this PR or can be put off until after we sort out if we are going to use traitlets.Builds on work of @has2k1