mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-02 06:20:59 +00:00
fix drawing bug when number of rows decreases
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29065 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
97d1907a52
commit
82d1ada3dc
4 changed files with 32 additions and 20 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2009-11-26 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSTableView.m: ([-noteNumberOfRowsChanged]) fid to redraw
|
||||||
|
the rectangle in the superview if the receiver shrinks.
|
||||||
|
|
||||||
2009-11-25 Wolfgang Lux <wolfgang.lux@gmail.com>
|
2009-11-25 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||||
|
|
||||||
* Source/NSCell.m (-_updateFieldEditor:): Don't write back
|
* Source/NSCell.m (-_updateFieldEditor:): Don't write back
|
||||||
|
|
|
@ -2174,6 +2174,7 @@ IF_NO_GC(NSAssert([event retainCount] > 0, NSInternalInconsistencyException));
|
||||||
if (resp != nil)
|
if (resp != nil)
|
||||||
{
|
{
|
||||||
IMP actionIMP = [resp methodForSelector: aSelector];
|
IMP actionIMP = [resp methodForSelector: aSelector];
|
||||||
|
|
||||||
if (0 != actionIMP)
|
if (0 != actionIMP)
|
||||||
{
|
{
|
||||||
actionIMP(resp, aSelector, sender);
|
actionIMP(resp, aSelector, sender);
|
||||||
|
|
|
@ -177,8 +177,8 @@ static NSImage *unexpandable = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Causes the outline column, the column containing the expand/collapse gadget, to
|
* Causes the outline column, the column containing the expand/collapse
|
||||||
* resize based on the amount of space needed by widest content.
|
* gadget, to resize based on the amount of space needed by widest content.
|
||||||
*/
|
*/
|
||||||
- (BOOL)autoResizesOutlineColumn
|
- (BOOL)autoResizesOutlineColumn
|
||||||
{
|
{
|
||||||
|
@ -186,8 +186,8 @@ static NSImage *unexpandable = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Causes the outline column, the column containing the expand/collapse gadget, to
|
* Causes the outline column, the column containing the expand/collapse
|
||||||
* resize based on the amount of space needed by widest content.
|
* gadget, to resize based on the amount of space needed by widest content.
|
||||||
*/
|
*/
|
||||||
- (BOOL)autosaveExpandedItems
|
- (BOOL)autosaveExpandedItems
|
||||||
{
|
{
|
||||||
|
@ -204,9 +204,9 @@ static NSImage *unexpandable = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Collapses the specified item. If collapseChildren is set to YES, then all of the
|
* Collapses the specified item. If collapseChildren is set to YES,
|
||||||
* expandable children of this item all also collapsed in a recursive fashion (i.e.
|
* then all of the expandable children of this item all also collapsed
|
||||||
* all children, grandchildren and etc).
|
* in a recursive fashion (i.e. all children, grandchildren and etc).
|
||||||
*/
|
*/
|
||||||
- (void) collapseItem: (id)item collapseChildren: (BOOL)collapseChildren
|
- (void) collapseItem: (id)item collapseChildren: (BOOL)collapseChildren
|
||||||
{
|
{
|
||||||
|
|
|
@ -4414,6 +4414,7 @@ static BOOL selectContiguousRegion(NSTableView *self,
|
||||||
- (void) setFrame: (NSRect)frameRect
|
- (void) setFrame: (NSRect)frameRect
|
||||||
{
|
{
|
||||||
NSRect tmpRect = frameRect;
|
NSRect tmpRect = frameRect;
|
||||||
|
|
||||||
if ([_super_view respondsToSelector: @selector(documentVisibleRect)])
|
if ([_super_view respondsToSelector: @selector(documentVisibleRect)])
|
||||||
{
|
{
|
||||||
float rowsHeight = ((_numberOfRows * _rowHeight) + 1);
|
float rowsHeight = ((_numberOfRows * _rowHeight) + 1);
|
||||||
|
@ -4758,6 +4759,8 @@ static BOOL selectContiguousRegion(NSTableView *self,
|
||||||
|
|
||||||
- (void) noteNumberOfRowsChanged
|
- (void) noteNumberOfRowsChanged
|
||||||
{
|
{
|
||||||
|
NSRect newFrame;
|
||||||
|
|
||||||
_numberOfRows = [self _numRows];
|
_numberOfRows = [self _numRows];
|
||||||
|
|
||||||
/* If we are selecting rows, we have to check that we have no
|
/* If we are selecting rows, we have to check that we have no
|
||||||
|
@ -4832,10 +4835,13 @@ static BOOL selectContiguousRegion(NSTableView *self,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[self setFrame: NSMakeRect (_frame.origin.x,
|
newFrame = _frame;
|
||||||
_frame.origin.y,
|
newFrame.size.height = (_numberOfRows * _rowHeight) + 1;
|
||||||
_frame.size.width,
|
if (NO == NSEqualRects(newFrame, NSUnionRect(newFrame, _frame)))
|
||||||
(_numberOfRows * _rowHeight) + 1)];
|
{
|
||||||
|
[_super_view setNeedsDisplayInRect: _frame];
|
||||||
|
}
|
||||||
|
[self setFrame: newFrame];
|
||||||
|
|
||||||
/* If we are shorter in height than the enclosing clipview, we
|
/* If we are shorter in height than the enclosing clipview, we
|
||||||
should redraw us now. */
|
should redraw us now. */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue