Skip to content

Commit 9df58e9

Browse files
committed
Need to request redraw after changing background or center
1 parent aeb2b12 commit 9df58e9

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/renderer_server/handlers/drawing_prop.rs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,19 @@ async fn modify_drawing(
9898
event_loop.set_title(title)?;
9999
},
100100

101-
Background(background) => drawing.background = background,
101+
Background(background) => {
102+
drawing.background = background;
102103

103-
Center(center) => drawing.center = center,
104+
// Signal the main thread that the image has changed
105+
event_loop.request_redraw()?;
106+
},
107+
108+
Center(center) => {
109+
drawing.center = center;
110+
111+
// Signal the main thread that the image has changed
112+
event_loop.request_redraw()?;
113+
},
104114

105115
Size(crate::Size {width, height}) => {
106116
drawing.width = width;

0 commit comments

Comments
 (0)