macOS: fix tooltips not closing on Catalina.

pull/528/head
Koen Schmeets 2019-11-27 13:51:27 +01:00 committed by whitequark
parent dcdfdec564
commit 0472b9ea60
1 changed files with 6 additions and 1 deletions

View File

@ -16,6 +16,7 @@ using namespace SolveSpace;
+ (NSToolTipManager *)sharedToolTipManager;
- (void)setInitialToolTipDelay:(double)delay;
- (void)orderOutToolTip;
- (void)abortToolTip;
- (void)_displayTemporaryToolTipForView:(id)arg1 withString:(id)arg2;
@end
@ -909,7 +910,11 @@ public:
NSToolTipManager *nsToolTipManager = [NSToolTipManager sharedToolTipManager];
if(newText.empty()) {
if ([nsToolTipManager respondsToSelector:@selector(abortToolTip)]) {
[nsToolTipManager abortToolTip];
} else {
[nsToolTipManager orderOutToolTip];
}
} else {
[nsToolTipManager _displayTemporaryToolTipForView:ssView withString:Wrap(newText)];
}