mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-28 19:08:50 +00:00
Fixed: under certain circumstances controls would not be drawn despite a call to setNeedsDisplay:YES. A typical symptom of this was custom CPViews' drawRect never being called. The error was caused by _CPDisplayServer throwing away its remaining work whenever the display code of a control called setNeedsLayout.
This commit is contained in:
1 parent
204df99375
commit
ded413481c
1 file changed
+4
-4
@@ -28,10 +28,10 @@ PREPARE_DOM_OPTIMIZATION();
|
||||
|
||||
var displayObjects = [],
|
||||
displayObjectsByUID = { },
|
||||
|
||||
|
||||
layoutObjects = [],
|
||||
layoutObjectsByUID = { },
|
||||
|
||||
|
||||
runLoop = [CPRunLoop mainRunLoop];
|
||||
|
||||
function _CPDisplayServerAddDisplayObject(anObject)
|
||||
@@ -44,7 +44,7 @@ function _CPDisplayServerAddDisplayObject(anObject)
|
||||
var index = displayObjects.length;
|
||||
|
||||
displayObjectsByUID[UID] = index;
|
||||
displayObjects[index] = anObject;
|
||||
displayObjects[index] = anObject;
|
||||
}
|
||||
|
||||
function _CPDisplayServerAddLayoutObject(anObject)
|
||||
@@ -100,7 +100,7 @@ function _CPDisplayServerAddLayoutObject(anObject)
|
||||
displayObjectsByUID = { };
|
||||
}
|
||||
else
|
||||
displayObjects = displayObjects.splice(0, index);
|
||||
displayObjects.splice(0, index);
|
||||
}
|
||||
|
||||
[runLoop performSelector:@selector(run) target:self argument:nil order:0 modes:[CPDefaultRunLoopMode]];
|
||||
|
||||
Reference in new issue
Block a user