Request layout in update instead of triggering manually
@@ -115,8 +115,6 @@ fn mouse_down(
// Handle click on header with file name.
if line_cursor == click_line {
- // Request layout to force a content height recalculation.
- ctx.request_layout();
ctx.submit_command(Command::new(
LAPCE_UI_COMMAND,
LapceUICommand::ToggleProblem(path.to_path_buf()),
@@ -274,6 +272,10 @@ fn update(
{
ctx.request_layout();
}
+
+ if data.problem.collapsed != old_data.problem.collapsed {
+ ctx.request_layout();
+ }
}
fn layout(
