File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -118,3 +118,10 @@ def test_export_to_png(self):
118
118
rmtree (tmp )
119
119
120
120
self .root .remove_widget (wid )
121
+
122
+ def test_disabled (self ):
123
+ from kivy .uix .widget import Widget
124
+ w = Widget (disabled = None )
125
+ w .disabled = False
126
+ w .disabled = True
127
+ self .assertEqual (w .disabled , True )
Original file line number Diff line number Diff line change @@ -1433,6 +1433,9 @@ def get_disabled(self):
1433
1433
return self ._disabled_count > 0
1434
1434
1435
1435
def set_disabled (self , value ):
1436
+ # Necessary to ensure a change between value of equal truthiness
1437
+ # doesn't mess up the count
1438
+ value = bool (value )
1436
1439
if value != self ._disabled_value :
1437
1440
self ._disabled_value = value
1438
1441
if value :
You can’t perform that action at this time.
0 commit comments