Skip to content

Commit

Permalink
redraw if run_ref failed
Browse files Browse the repository at this point in the history
  • Loading branch information
galister committed Apr 15, 2024
1 parent 4d7b4fa commit 8b81fd5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/backend/uidev/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,9 @@ pub fn uidev_run(panel_name: &str) -> anyhow::Result<()> {
.create_command_buffer(CommandBufferUsage::OneTimeSubmit)
.unwrap();
cmd_buf.begin_rendering(target).unwrap();
let _ = cmd_buf.run_ref(&preview.pass);
if cmd_buf.run_ref(&preview.pass).is_err() {
window.request_redraw();
}
cmd_buf.end_rendering().unwrap();

let command_buffer = cmd_buf.build().unwrap();
Expand Down

0 comments on commit 8b81fd5

Please sign in to comment.