fixed: bezel not updating values after switching to favorites and back from favorites

This commit is contained in:
Gennadiy Potapov 2016-04-03 14:34:21 +08:00
parent 18de0ac22e
commit b3c1c5b14b
2 changed files with 8 additions and 2 deletions

View file

@ -577,6 +577,7 @@
stashedStackPosition = stackPosition;
stackPosition = favoritesStackPosition;
[bezel setColor:YES];
[self updateBezel];
}
- (void)restoreStashedStore
@ -588,6 +589,7 @@
favoritesStackPosition = stackPosition;
stackPosition = stashedStackPosition;
[bezel setColor:NO];
[self updateBezel];
}
}
@ -1023,6 +1025,9 @@
if (stackPosition == 0 && [clippingStore jcListCount] == 0) { // empty
[bezel setText:@""];
[bezel setCharString:@"Empty"];
[bezel setSource:@""];
[bezel setDate:@""];
[bezel setSourceIcon:nil];
}
else { // normal
[self fillBezel];
@ -1050,7 +1055,7 @@
- (void) hideBezel
{
[bezel orderOut:nil];
[bezel setCharString:@""];
[bezel setCharString:@"Empty"];
isBezelDisplayed = NO;
}

View file

@ -62,7 +62,7 @@ static const float lineHeight = 16;
[textParagraph setLineSpacing:100.0];
NSDictionary *attrDic = [NSDictionary dictionaryWithObjectsAndKeys:textParagraph, NSParagraphStyleAttributeName, nil];
NSAttributedString *attrString = [[NSAttributedString alloc] initWithString:@"foo" attributes:attrDic];
NSAttributedString *attrString = [[NSAttributedString alloc] initWithString:@"" attributes:attrDic];
[sourceFieldApp setAllowsEditingTextAttributes:YES];
[sourceFieldApp setAttributedStringValue:attrString];
@ -104,6 +104,7 @@ static const float lineHeight = 16;
[charField setDrawsBackground:YES];
[charField setBordered:NO];
[charField setAlignment:NSCenterTextAlignment];
[charField setStringValue:@"Empty"];
[self setInitialFirstResponder:textField];
return self;