Skip to content

Commit

Permalink
reverted last optimization - it caused bug issue gmoledina#72
Browse files Browse the repository at this point in the history
  • Loading branch information
gmoledina committed Apr 19, 2012
1 parent e3cc047 commit a8b0f07
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 1 addition & 7 deletions GMGridView/GMGridView.m
Expand Up @@ -296,7 +296,7 @@ - (void)layoutSubviews

if (_rotationActive)
{
_rotationActive = NO;
_rotationActive = NO;

// Updating all the items size

Expand Down Expand Up @@ -1341,12 +1341,6 @@ - (void)loadRequiredItems
{
NSRange rangeOfPositions = [self.layoutStrategy rangeOfPositionsInBoundsFromOffset: self.contentOffset];
NSRange loadedPositionsRange = NSMakeRange(self.firstPositionLoaded, self.lastPositionLoaded - self.firstPositionLoaded);

if ((self.firstPositionLoaded != GMGV_INVALID_POSITION) &&
(self.lastPositionLoaded != GMGV_INVALID_POSITION) &&
NSEqualRanges(rangeOfPositions, loadedPositionsRange) ) {
return; // No need to load anything...
}

// calculate new position range
self.firstPositionLoaded = self.firstPositionLoaded == GMGV_INVALID_POSITION ? rangeOfPositions.location : MIN(self.firstPositionLoaded, (NSInteger)rangeOfPositions.location);
Expand Down
4 changes: 4 additions & 0 deletions GMGridView/GMGridView.xcodeproj/project.pbxproj
Expand Up @@ -212,6 +212,7 @@
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_THUMB_SUPPORT = NO;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
Expand All @@ -233,6 +234,7 @@
CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_THUMB_SUPPORT = NO;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
Expand All @@ -248,6 +250,7 @@
buildSettings = {
DSTROOT = /tmp/GMGridView.dst;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_THUMB_SUPPORT = NO;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand All @@ -259,6 +262,7 @@
buildSettings = {
DSTROOT = /tmp/GMGridView.dst;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_THUMB_SUPPORT = NO;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand Down

0 comments on commit a8b0f07

Please sign in to comment.