mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-10 20:41:59 +00: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
1 changed files with 1 additions and 4 deletions
|
@ -321,10 +321,7 @@ impl Element for AnyView {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut element = state
|
let mut element = (self.request_layout)(self, cx).1;
|
||||||
.element
|
|
||||||
.take()
|
|
||||||
.unwrap_or_else(|| (self.request_layout)(self, cx).1);
|
|
||||||
element.draw(bounds.origin, bounds.size.into(), cx);
|
element.draw(bounds.origin, bounds.size.into(), cx);
|
||||||
|
|
||||||
state.cache_key = Some(ViewCacheKey {
|
state.cache_key = Some(ViewCacheKey {
|
||||||
|
|
Loading…
Reference in a new issue