Skip to content

Commit

Permalink
fetch upstream and fix some inconsistence
Browse files Browse the repository at this point in the history
  • Loading branch information
widcardw committed Mar 30, 2023
1 parent 09e02eb commit c5cdd0c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/widgets/grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ impl Widget<ApplicationState> for CanvasGrid {
win_data.mode = DrawingTools::Eraser;
}
Code::Digit5 => {
data.mode = DrawingTools::JointFixer;
win_data.mode = DrawingTools::JointFixer;
}
Code::Delete | Code::Backspace => {
self.grid_list.erase_highlighted();
Expand Down
6 changes: 5 additions & 1 deletion src/widgets/toolbar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,12 @@ impl ToolBarWidget {
DrawingTools::JointFixer.to_string(),
)
.on_click(|ctx, data: &mut ApplicationState, _env| {
let win_data = data
.windows
.get_mut(&ctx.window_id())
.expect("Invalid WindowID");
let tool = DrawingTools::JointFixer;
data.mode = tool;
win_data.mode = tool;
ctx.submit_notification(BUTTON_HIGHLIGHT_COMMAND.with(tool.to_string()));
ctx.set_handled();
}),
Expand Down

0 comments on commit c5cdd0c

Please sign in to comment.