mirror of
https://github.com/penpot/penpot.git
synced 2026-05-17 05:53:45 +00:00
Merge pull request #9500 from penpot/alotor-fix-text-edition
🐛 Fix problem when editing text not being redrawn
This commit is contained in:
commit
7650fa1716
@ -21,6 +21,7 @@ use options::RenderOptions;
|
|||||||
pub use surfaces::{SurfaceId, Surfaces};
|
pub use surfaces::{SurfaceId, Surfaces};
|
||||||
|
|
||||||
use crate::error::{Error, Result};
|
use crate::error::{Error, Result};
|
||||||
|
use crate::math;
|
||||||
use crate::shapes::{
|
use crate::shapes::{
|
||||||
all_with_ancestors, radius_to_sigma, Blur, BlurType, Corners, Fill, Shadow, Shape, SolidColor,
|
all_with_ancestors, radius_to_sigma, Blur, BlurType, Corners, Fill, Shadow, Shape, SolidColor,
|
||||||
Stroke, StrokeKind, TextContent, Type,
|
Stroke, StrokeKind, TextContent, Type,
|
||||||
@ -452,7 +453,8 @@ impl RenderState {
|
|||||||
};
|
};
|
||||||
// Only allow using the cached pixels for pure translations.
|
// Only allow using the cached pixels for pure translations.
|
||||||
// For non-translation transforms (scale/rotate/skew), cached pixels won't match.
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3008,6 +3010,7 @@ impl RenderState {
|
|||||||
&tree.modifier_ids(),
|
&tree.modifier_ids(),
|
||||||
moved_bounds,
|
moved_bounds,
|
||||||
);
|
);
|
||||||
|
|
||||||
if use_cached {
|
if use_cached {
|
||||||
if let Some(crop) = self.backbuffer_crop_cache.get(&node_id) {
|
if let Some(crop) = self.backbuffer_crop_cache.get(&node_id) {
|
||||||
let crop_image = &crop.image;
|
let crop_image = &crop.image;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user