File tree 1 file changed +12
-9
lines changed
1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -55,27 +55,30 @@ class CallbackHandler:
55
55
56
56
def CONNECT_CALLBACK (in_class = False ):
57
57
def decorator (f ):
58
- wraps (f )
59
- f ._wx_connect_handled = True
60
- if not in_class :
58
+ wraps (f )
59
+ if in_class :
60
+ f ._wx_connect_handled = True
61
+ else :
61
62
_GLOBAL_CONNECT_CALLBACK_LIST .append (f )
62
63
return f
63
64
return decorator
64
65
65
66
def RECV_CALLBACK (in_class = False ):
66
67
def decorator (f ):
67
68
wraps (f )
68
- f ._wx_recv_handled = True
69
- if not in_class :
70
- _GLOBAL_RECV_CALLBACK_LIST .append (f )
69
+ if in_class :
70
+ f ._wx_recv_handled = True
71
+ else :
72
+ _GLOBAL_RECV_CALLBACK_LIST .append (f )
71
73
return f
72
74
return decorator
73
75
74
76
def CLOSE_CALLBACK (in_class = False ):
75
77
def decorator (f ):
76
- wraps (f )
77
- f ._wx_close_handled = True
78
- if not in_class :
78
+ wraps (f )
79
+ if in_class :
80
+ f ._wx_close_handled = True
81
+ else :
79
82
_GLOBAL_CLOSE_CALLBACK_LIST .append (f )
80
83
return f
81
84
return decorator
You can’t perform that action at this time.
0 commit comments