File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ - (void)activateWithPopover {
73
73
74
74
// Setup and show the popover.
75
75
self.popover = [BFColorPickerPopover sharedPopover ];
76
+ self.popover .delegate = self;
76
77
self.popover .color = self.color ;
77
78
[self .popover showRelativeToRect: self .frame ofView: self .superview preferredEdge: self .preferredEdgeForPopover];
78
79
self.popover .colorWell = self;
@@ -101,6 +102,7 @@ - (void)deactivate {
101
102
if (!self.isActive ) return ;
102
103
[super deactivate ];
103
104
self.popover .colorWell = nil ;
105
+ self.popover .delegate = nil ;
104
106
self.popover = nil ;
105
107
self.isActive = NO ;
106
108
}
@@ -116,4 +118,9 @@ - (void)mouseDown:(NSEvent *)theEvent {
116
118
117
119
}
118
120
121
+ - (void )popoverDidClose : (NSNotification *)notification
122
+ {
123
+ [self deactivate ];
124
+ }
125
+
119
126
@end
You can’t perform that action at this time.
0 commit comments