Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Added get_status() function to the CheckButtons widget #6018
Conversation
mdboom
added the
needs_review
label
Feb 17, 2016
QuLogic
commented on an outdated diff
Feb 18, 2016
| @@ -602,6 +602,12 @@ def set_active(self, index): | ||
| return | ||
| for cid, func in six.iteritems(self.observers): | ||
| func(self.labels[index].get_text()) | ||
| + | ||
| + def get_status(self): | ||
| + """ | ||
| + returns a tuple of the status (True/False) of all of the check buttons | ||
| + """ | ||
| + return [l1.get_visible() for (l1,l2) in self.lines] |
|
|
|
@QuLogic: sure! Comma added! |
QuLogic
added the
widgets/UI
label
Feb 18, 2016
QuLogic
added this to the
2.1 (next point release)
milestone
Feb 18, 2016
|
Needs unit test, and an update to whats_new.rst. On Wed, Feb 17, 2016 at 7:44 PM, Danhickstein notifications@github.com
|
|
Please create a new file in the whats_new folder, not editing the main rst file (it helps keep merge confilcts down). The readme in that folder has a template. |
|
@tacaswell @WeatherGod, sounds good! I'll get to work on that. |
|
Okay, I added a file to I couldn't figure out how to use the |
|
Hmmm, I don't really understand why the TravisCI tests are failing. It seems to have to do with some colorbar plot comparisons. I don't think that I should have caused any problems with these. Should I worry about this? |
WeatherGod
closed this
Feb 22, 2016
WeatherGod
reopened this
Feb 22, 2016
mdboom
added needs_review and removed needs_review
labels
Feb 22, 2016
|
No, there was a problem commit that got merged into master last week that caused problems. I closed/reopened your PR to force a re-run of the CI's. |
|
Note, we haven't figured out how to force Appveyor to redo their runs, so ignore that for now. |
|
Thanks! |
|
I cleaned up the code to conform to pep8, and now it passes that test. The Travis Python 2.7 test is still failing. It's one of the font tests, so it seems unrelated to these changes. |
|
Oh, it looks like Travis and Appveyor are building just fine now. Anything else that you would like me to add to this PR? |
WeatherGod
added a commit
that referenced
this pull request
Feb 23, 2016
|
|
WeatherGod |
1ca5977
|
WeatherGod
merged commit 1ca5977
into matplotlib:master
Feb 23, 2016
mdboom
removed the
needs_review
label
Feb 23, 2016
|
Looks fine to me. Could probably spruce up the unit test a bit, but we can leave that as a future task. |
DanHickstein commentedFeb 17, 2016
This allows the user to query the status of a CheckButtons instance using
check.get_status()as discussed in issue #5930 (comment)Here is an adaptation of the CheckButtons example to show this functionality:
I also fixed a typo in the CheckButtons docstring that referred to them as "radio button".