Skip to content

Commit

Permalink
MacPDF: Make Debug menu work when sidebar has focus
Browse files Browse the repository at this point in the history
  • Loading branch information
nico committed Jan 16, 2024
1 parent dc23a51 commit aa2542e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions Meta/Lagom/Contrib/MacPDF/MacPDFWindowController.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ NS_ASSUME_NONNULL_BEGIN

- (IBAction)goToNextPage:(id)sender;
- (IBAction)goToPreviousPage:(id)sender;
- (IBAction)toggleShowClippingPaths:(id)sender;
- (IBAction)showGoToPageDialog:(id)sender;

- (void)pdfDidInitialize;
Expand Down
12 changes: 12 additions & 0 deletions Meta/Lagom/Contrib/MacPDF/MacPDFWindowController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,18 @@ - (IBAction)goToPreviousPage:(id)sender
[_pdfView goToPreviousPage:sender];
}

- (BOOL)validateMenuItem:(NSMenuItem*)item
{
if ( [_pdfView validateMenuItem:item])
return YES;
return [super validateMenuItem:item];
}

- (IBAction)toggleShowClippingPaths:(id)sender
{
[_pdfView toggleShowClippingPaths:sender];
}

- (IBAction)showGoToPageDialog:(id)sender
{
auto alert = [[NSAlert alloc] init];
Expand Down

0 comments on commit aa2542e

Please sign in to comment.