mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-26 10:14:39 +03:00
gpui: Always recompute layout on cache miss. (#4131)
I'm not yet sure whether this is 100% correct, but it seems to alleviate the following issue: `When opening a dock, the panel doesn't appear right away. An empty dock is briefly visible.` Release Notes: - Fixed panel layout being incorrect for a brief time after opening (fixes https://github.com/zed-industries/community/issues/2415)
This commit is contained in:
commit
7860372beb
@ -321,10 +321,7 @@ impl Element for AnyView {
|
||||
}
|
||||
}
|
||||
|
||||
let mut element = state
|
||||
.element
|
||||
.take()
|
||||
.unwrap_or_else(|| (self.request_layout)(self, cx).1);
|
||||
let mut element = (self.request_layout)(self, cx).1;
|
||||
element.draw(bounds.origin, bounds.size.into(), cx);
|
||||
|
||||
state.cache_key = Some(ViewCacheKey {
|
||||
|
Loading…
Reference in New Issue
Block a user