Pass menuForEvent: to the enclosing tableview. This gets contextual menus to appear in e timeline.
This commit is contained in:
parent
839780303f
commit
dcf758acc5
@ -6,6 +6,7 @@
|
||||
// Copyright © 2016 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import RSCore;
|
||||
#import "RSMultiLineView.h"
|
||||
#import "RSMultiLineRenderer.h"
|
||||
#import "RSMultiLineRendererMeasurements.h"
|
||||
@ -137,6 +138,16 @@ static NSAttributedString *emptyAttributedString = nil;
|
||||
}
|
||||
|
||||
|
||||
- (NSMenu *)menuForEvent:(NSEvent *)event {
|
||||
|
||||
NSTableView *tableView = [self rs_enclosingTableView];
|
||||
if (tableView) {
|
||||
return [tableView menuForEvent:event];
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
||||
- (void)drawRect:(NSRect)r {
|
||||
|
||||
if (self.selected) {
|
||||
|
@ -124,6 +124,14 @@ static NSAttributedString *emptyAttributedString = nil;
|
||||
return self.intrinsicSize;
|
||||
}
|
||||
|
||||
- (NSMenu *)menuForEvent:(NSEvent *)event {
|
||||
|
||||
NSTableView *tableView = [self rs_enclosingTableView];
|
||||
if (tableView) {
|
||||
return [tableView menuForEvent:event];
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void)drawRect:(NSRect)r {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user