Revision: 29189
http://sourceforge.net/p/bibdesk/svn/29189
Author: hofman
Date: 2025-04-24 15:40:44 +0000 (Thu, 24 Apr 2025)
Log Message:
-----------
combine if/else
Modified Paths:
--------------
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m 2025-04-24
15:26:06 UTC (rev 29188)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m 2025-04-24
15:40:44 UTC (rev 29189)
@@ -1127,20 +1127,17 @@
[[NSNotificationCenter defaultCenter] removeObserver:self
name:FVPreviewerWillCloseNotification object:nil];
}
- else if ([self superview] == nil) {
- [[NSNotificationCenter defaultCenter] addObserver:self
-
selector:@selector(handlePreviewerWillClose:)
-
name:FVPreviewerWillCloseNotification
- object:nil];
- }
+ if (nil == [self superview])
+ [[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(handlePreviewerWillClose:)
name:FVPreviewerWillCloseNotification object:nil];
+ else
+ [[NSNotificationCenter defaultCenter] removeObserver:self
name:NSViewFrameDidChangeNotification object:nil];
+
if ([_backgroundView superview] != self && [self superview] !=
newSuperview) {
[_backgroundView setFrame:[self bounds]];
[self addSubview:_backgroundView positioned:NSWindowBelow
relativeTo:nil];
}
- if ([self superview])
- [[NSNotificationCenter defaultCenter] removeObserver:self
name:NSViewFrameDidChangeNotification object:nil];
}
- (void)viewDidMoveToSuperview {
@@ -1147,11 +1144,12 @@
[super viewDidMoveToSuperview];
NSView *superview = [self superview];
- NSScrollView *scrollView = [self enclosingScrollView];
- NSView *observedView = scrollView ? superview : self;
// this can be send in a dealloc when the view hierarchy is decomposed
if (superview) {
+ NSScrollView *scrollView = [self enclosingScrollView];
+ NSView *observedView = scrollView ? superview : self;
+
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(_handleSuperviewDidResize:)
name:NSViewFrameDidChangeNotification object:observedView];
[self _recalculateGridSize];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit