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

Update gui.py #218

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
5 changes: 3 additions & 2 deletions remi/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -2733,8 +2733,9 @@ def __init__(self, text, **kwargs):
"sendCallback('%s','%s');" \
"event.stopPropagation();event.preventDefault();" % (self.identifier, self.EVENT_ONCLICK)
self.set_text(text)
self.treeopen = False
self.attributes['treeopen'] = 'false'
treeopen = kwargs.get('treeopen', False)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be ok to have a treeopen parameter, but it's better to have it as an explicit optional parameter.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. At the moment I don't know how to make a pull request after committing, so here's the link:
saddy001@3c5cb94#diff-4be7e258419023f7dad3cc9f659df8b9

self.treeopen = treeopen
self.attributes['treeopen'] = str(treeopen).lower()
self.attributes['has-subtree'] = 'false'

def append(self, value, key=''):
Expand Down