mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-07 17:38:02 +00:00
Fixed: noteHeightOfRowsWithIndexesChanged: was not showing immediatly row height changes.
Todo: instead of reloading everything we should be able to just relayout frames for visible views and then tile.
This commit is contained in:
1 parent
eae9a10a7d
commit
690ae1a7b6
2 files changed
+22
-9
No files matched your search
+16
-8
@@ -2210,7 +2210,7 @@ NOT YET IMPLEMENTED
|
||||
// this line serves two purposes
|
||||
// 1. it updates the _numberOfRows cache with the -numberOfRows call
|
||||
// 2. it updates the row height cache if needed
|
||||
[self noteHeightOfRowsWithIndexesChanged:[CPIndexSet indexSetWithIndexesInRange:CPMakeRange(0, [self numberOfRows])]];
|
||||
[self _noteHeightOfRowsWithIndexesChanged:[CPIndexSet indexSetWithIndexesInRange:CPMakeRange(0, [self numberOfRows])]];
|
||||
|
||||
// remove row indexes from the selection if they no longer exist
|
||||
var hangingSelections = oldNumberOfRows - _numberOfRows;
|
||||
@@ -2232,13 +2232,10 @@ NOT YET IMPLEMENTED
|
||||
[self tile];
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
Informs the receiver that the rows specified in indexSet have changed height.
|
||||
|
||||
@param anIndexSet an index set containing the indexes of the rows which changed height
|
||||
/*
|
||||
Like noteHeightOfRowsWithIndexesChanged: but without reloading the data views
|
||||
*/
|
||||
- (void)noteHeightOfRowsWithIndexesChanged:(CPIndexSet)anIndexSet
|
||||
- (void)_noteHeightOfRowsWithIndexesChanged:(CPIndexSet)anIndexSet
|
||||
{
|
||||
if (!(_implementedDelegateMethods & CPTableViewDelegate_tableView_heightOfRow_))
|
||||
return;
|
||||
@@ -2261,6 +2258,17 @@ NOT YET IMPLEMENTED
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
Informs the receiver that the rows specified in indexSet have changed height.
|
||||
|
||||
@param anIndexSet an index set containing the indexes of the rows which changed height
|
||||
*/
|
||||
- (void)noteHeightOfRowsWithIndexesChanged:(CPIndexSet)anIndexSet
|
||||
{
|
||||
[self _noteHeightOfRowsWithIndexesChanged:anIndexSet];
|
||||
[self _reloadDataViews];
|
||||
}
|
||||
|
||||
/*!
|
||||
Lays out the dataviews and resizes the tableview so that everything fits.
|
||||
*/
|
||||
@@ -2279,7 +2287,7 @@ NOT YET IMPLEMENTED
|
||||
{
|
||||
// if this is the fist run we need to populate the cache
|
||||
if ([self numberOfRows] !== _cachedRowHeights.length)
|
||||
[self noteHeightOfRowsWithIndexesChanged:[CPIndexSet indexSetWithIndexesInRange:CPMakeRange(0, [self numberOfRows])]];
|
||||
[self _noteHeightOfRowsWithIndexesChanged:[CPIndexSet indexSetWithIndexesInRange:CPMakeRange(0, [self numberOfRows])]];
|
||||
|
||||
var heightObject = _cachedRowHeights[_cachedRowHeights.length - 1],
|
||||
height = heightObject.heightAboveRow + heightObject.height + _intercellSpacing.height;
|
||||
|
||||
@@ -209,13 +209,18 @@ CPLogRegister(CPLogConsole)
|
||||
row = [table rowForView:sender];
|
||||
|
||||
[table noteHeightOfRowsWithIndexesChanged:[CPIndexSet indexSetWithIndex:row]];
|
||||
[table reloadData];
|
||||
}
|
||||
|
||||
// Action sent from a cellView subview to its target.
|
||||
CPLog.debug(_cmd + " value=" + [sender intValue]);
|
||||
}
|
||||
|
||||
- (void)setVariableRowHeight:(BOOL)flag
|
||||
{
|
||||
variableRowHeight = flag;
|
||||
[[self tableView] reloadData];
|
||||
}
|
||||
|
||||
- (IBAction)_textFieldNotBezeledAction:(id)sender
|
||||
{
|
||||
CPLog.debug(_cmd + " value=" + [sender stringValue]);
|
||||
|
||||
Reference in new issue
Block a user