mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 19:01:15 +00:00
always reset _needsLayout in -layout and not only
-layoutSubtreeIfNeeded via layoutViewAndSubvies. Apple states for -(void) layout: Override this method if your custom view needs to perform custom layout not expressible using the constraint-based layout system. In this case you are responsible for setting needsLayout to true when something that impacts your custom layout changes. Which seems to suggest that layout does the reset of needsLayout, since setting it is up to programmer.
This commit is contained in:
parent
4c1687d2b4
commit
5917f0519b
1 changed files with 2 additions and 1 deletions
|
@ -5172,6 +5172,8 @@ static NSView* findByTag(NSView *view, NSInteger aTag, NSUInteger *level)
|
|||
|
||||
- (void) layout
|
||||
{
|
||||
_needsLayout = NO;
|
||||
|
||||
GSAutoLayoutEngine *engine = [self _layoutEngine];
|
||||
if (!engine)
|
||||
{
|
||||
|
@ -5307,7 +5309,6 @@ static NSView* findByTag(NSView *view, NSInteger aTag, NSUInteger *level)
|
|||
if (_needsLayout)
|
||||
{
|
||||
[self layout];
|
||||
_needsLayout = NO;
|
||||
}
|
||||
|
||||
NSArray *subviews = [self subviews];
|
||||
|
|
Loading…
Reference in a new issue