Skip to content

Commit

Permalink
lsp preview: set ui_is_visible to true also when re-opening the pre…
Browse files Browse the repository at this point in the history
…view

Fixes: #6063
  • Loading branch information
ogoffart authored and hunger committed Sep 9, 2024
1 parent 3d1e570 commit 84fe321
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tools/lsp/preview/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,12 @@ pub(super) fn open_ui_impl(preview_state: &mut PreviewState) -> Result<(), slint
Some(ui) => ui,
None => {
let ui = super::ui::create_ui(default_style, experimental)?;

let mut cache = super::CONTENT_CACHE.get_or_init(Default::default).lock().unwrap();
cache.ui_is_visible = true;

preview_state.ui.insert(ui)
}
};

super::CONTENT_CACHE.get_or_init(Default::default).lock().unwrap().ui_is_visible = true;

let api = ui.global::<crate::preview::ui::Api>();
api.set_show_preview_ui(show_preview_ui);
ui.window().set_fullscreen(fullscreen);
Expand Down

0 comments on commit 84fe321

Please sign in to comment.