Revision: 25404
http://sourceforge.net/p/bibdesk/svn/25404
Author: hofman
Date: 2021-01-15 22:08:27 +0000 (Fri, 15 Jan 2021)
Log Message:
-----------
Indicate locked pdf by zero page count
Modified Paths:
--------------
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPDFIcon.m
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPDFIcon.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPDFIcon.m 2021-01-15
17:22:41 UTC (rev 25403)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPDFIcon.m 2021-01-15
22:08:27 UTC (rev 25404)
@@ -47,7 +47,6 @@
typedef struct __FVDocumentDescription {
size_t _pageCount;
NSSize _fullSize;
- BOOL _isLocked;
} _FVDocumentDescription;
static pthread_mutex_t _releaseLock;
@@ -345,9 +344,9 @@
_FVDocumentDescription *desc = NSMapGet(_documentDescriptions,
_cacheKey);
pthread_mutex_unlock(&_descriptionLock);
if (desc) {
- _pageCount = desc->_pageCount;
+ _pageCount = desc->_pageCount ?: 1;
_fullSize = desc->_fullSize;
- _isLocked = desc->_isLocked;
+ _isLocked = 0 == desc->_pageCount;
}
NSParameterAssert(_thumbnailSize.width > 0 &&
_thumbnailSize.height > 0);
exitEarly = NO == FVShouldDrawFullImageWithThumbnailSize(size,
_thumbnailSize) && _pageCount > 0;
@@ -390,9 +389,8 @@
_fullSize = NSMakeSize(NSHeight(pageRect) * FVDefaultScale,
NSWidth(pageRect) * FVDefaultScale);
_FVDocumentDescription *desc = NSZoneMalloc(NULL,
sizeof(_FVDocumentDescription));
- desc->_pageCount = _pageCount;
+ desc->_pageCount = _isLocked ? 0 : _pageCount;
desc->_fullSize = _fullSize;
- desc->_isLocked = _isLocked;
pthread_mutex_lock(&_descriptionLock);
NSMapInsert(_documentDescriptions, _cacheKey, desc);
pthread_mutex_unlock(&_descriptionLock);
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