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
PR: Fix crash on empty project explorer context menu #5603
PR: Fix crash on empty project explorer context menu #5603
Conversation
@csabella, please review this one. |
Hi @timhoffm, thanks for your contribution! Can you explain why you added the Sorry, I accidentally hit the |
@csabella conerning IMHO the contract of
so,
However, the TLDR: Since I currently cannot reproduce my case, we could leave out |
@timhoffm I believe you receive the error on the menu if the change to I think the point of |
Yep, that was the purpose. I have to admit I added EmptyWidget in a bit of a rush before releasing Spyder 3, but if we can get rid of it I think it'd be better. @csabella, how could we use TreeWidget to be empty? |
@ccordoba12 I don't know if a TreeWidget could be empty, but I was thinking that In any event, I think the best move might be just to create a new issue to address the |
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.
@timhoffm Please remove the emptywidget.setup_view()
. We can open that as a separate issue since there might be additional changes. Thanks!
fixes #5594
The fix works, even though, I'd recommend a change in the design. IMHO
setup_view()
should be part of the__init__
, because it's necessary to obtain a fully functional (even if maybe emtpy) widget.