clear the cancel button when the value is set to an empty string (bug 286441)
git-svn-id: svn://10.0.0.236/trunk@176919 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
33c5a90e5b
commit
d163844af8
@ -135,6 +135,14 @@ const float STFSymbolYOffset = 4.0;
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
// override to clear out the cancel button if given an empty value
|
||||
- (void)setStringValue:(NSString *)aString
|
||||
{
|
||||
if ([aString length] == 0)
|
||||
_shouldShowCancelButton = NO;
|
||||
[super setStringValue: aString];
|
||||
}
|
||||
|
||||
|
||||
- (BOOL)hasPopUpButton
|
||||
{
|
||||
@ -267,8 +275,7 @@ const float STFSymbolYOffset = 4.0;
|
||||
|
||||
- (void)cancelButtonClickedWithFrame:(NSRect)aFrame inView:(NSView *)aView
|
||||
{
|
||||
[self setStringValue:@""];
|
||||
_shouldShowCancelButton = NO;
|
||||
[self setStringValue:@""]; // clears the cancel button
|
||||
_shouldShowSelectedPopUpItem = YES;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user