Revision: 15641 http://sourceforge.net/p/skim-app/code/15641 Author: hofman Date: 2025-07-11 14:51:46 +0000 (Fri, 11 Jul 2025) Log Message: ----------- let pdfview add text note editor to documentView
Modified Paths: -------------- trunk/SKPDFView.m trunk/SKTextNoteEditor.m Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2025-07-11 14:43:33 UTC (rev 15640) +++ trunk/SKPDFView.m 2025-07-11 14:51:46 UTC (rev 15641) @@ -2775,6 +2775,7 @@ return; editor = [[SKTextNoteEditor alloc] initWithPDFView:self annotation:currentAnnotation]; + [[self documentView] addSubview:editor]; [editor startEditingWithEvent:theEvent]; [self updatedAnnotation:currentAnnotation]; Modified: trunk/SKTextNoteEditor.m =================================================================== --- trunk/SKTextNoteEditor.m 2025-07-11 14:43:33 UTC (rev 15640) +++ trunk/SKTextNoteEditor.m 2025-07-11 14:51:46 UTC (rev 15641) @@ -91,7 +91,7 @@ - (void)updateFrame { NSRect frame = [pdfView backingAlignedRect:[pdfView convertRect:[annotation bounds] fromPage:[annotation page]] options:NSAlignAllEdgesNearest]; - frame = [pdfView convertRect:frame toView:[pdfView documentView]]; + frame = [pdfView convertRect:frame toView:[self superview]]; [self setFrame:frame]; } @@ -180,9 +180,8 @@ } - (void)startEditingWithEvent:(NSEvent *)event { + [self updateFrame]; [self setUpTextView]; - [self updateFrame]; - [[pdfView documentView] addSubview:self]; [[pdfView window] recalculateKeyViewLoop]; [textView scrollPoint:NSZeroPoint]; [annotation setShouldDisplay:NO]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Skim-app-commit mailing list Skim-app-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-commit