summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-09-18 13:57:47 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-09-18 13:57:47 +0200
commita01b123cec1b57a9100d56f567fcfbf91967b12f (patch)
tree3655ef9ada34a7936b2502685d4d427061a9ea61 /graphics
parentd1440ceca6340d045e556eb05354c254881732f0 (diff)
downloadiced-a01b123cec1b57a9100d56f567fcfbf91967b12f.tar.gz
iced-a01b123cec1b57a9100d56f567fcfbf91967b12f.tar.bz2
iced-a01b123cec1b57a9100d56f567fcfbf91967b12f.zip
Shape as needed only in `update` during `layout`
Diffstat (limited to 'graphics')
-rw-r--r--graphics/src/text/editor.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/graphics/src/text/editor.rs b/graphics/src/text/editor.rs
index 18c9b572..59096e74 100644
--- a/graphics/src/text/editor.rs
+++ b/graphics/src/text/editor.rs
@@ -442,8 +442,6 @@ impl editor::Editor for Editor {
}
}
- editor.shape_as_needed(font_system.raw());
-
self.0 = Some(Arc::new(internal));
}
@@ -487,8 +485,6 @@ impl editor::Editor for Editor {
internal.font = new_font;
internal.topmost_line_changed = Some(0);
-
- internal.editor.shape_as_needed(font_system.raw());
}
let metrics = internal.editor.buffer().metrics();
@@ -526,6 +522,8 @@ impl editor::Editor for Editor {
new_highlighter.change_line(topmost_line_changed);
}
+ internal.editor.shape_as_needed(font_system.raw());
+
self.0 = Some(Arc::new(internal));
}