🐛 Fix problem when editing text not being redrawn

This commit is contained in:
alonso.torres 2026-05-11 15:35:10 +02:00 committed by Alejandro Alonso
parent fd82744c62
commit effb8bcf10

View File

@ -21,6 +21,7 @@ use options::RenderOptions;
pub use surfaces::{SurfaceId, Surfaces};
use crate::error::{Error, Result};
use crate::math;
use crate::shapes::{
all_with_ancestors, radius_to_sigma, Blur, BlurType, Corners, Fill, Shadow, Shape, SolidColor,
Stroke, StrokeKind, TextContent, Type,
@ -452,7 +453,8 @@ impl RenderState {
};
// Only allow using the cached pixels for pure translations.
// For non-translation transforms (scale/rotate/skew), cached pixels won't match.
if !crate::math::is_move_only_matrix(m) {
// If the transform is the identity means a reflow, we need to redraw as well.
if math::identitish(m) || !math::is_move_only_matrix(m) {
return false;
}
@ -3008,6 +3010,7 @@ impl RenderState {
&tree.modifier_ids(),
moved_bounds,
);
if use_cached {
if let Some(crop) = self.backbuffer_crop_cache.get(&node_id) {
let crop_image = &crop.image;