Skip to content

Commit

Permalink
Need to request redraw after changing background or center
Browse files Browse the repository at this point in the history
  • Loading branch information
sunjay committed May 25, 2020
1 parent ca07ca1 commit ead3a9b
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/renderer_server/handlers/drawing_prop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,19 @@ async fn modify_drawing(
event_loop.set_title(title)?;
},

Background(background) => drawing.background = background,
Background(background) => {
drawing.background = background;

Center(center) => drawing.center = center,
// Signal the main thread that the image has changed
event_loop.request_redraw()?;
},

Center(center) => {
drawing.center = center;

// Signal the main thread that the image has changed
event_loop.request_redraw()?;
},

Size(crate::Size {width, height}) => {
drawing.width = width;
Expand Down

0 comments on commit ead3a9b

Please sign in to comment.