Skip to content

Commit c5cdd0c

Browse files
committed
fetch upstream and fix some inconsistence
1 parent 09e02eb commit c5cdd0c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/widgets/grid.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ impl Widget<ApplicationState> for CanvasGrid {
109109
win_data.mode = DrawingTools::Eraser;
110110
}
111111
Code::Digit5 => {
112-
data.mode = DrawingTools::JointFixer;
112+
win_data.mode = DrawingTools::JointFixer;
113113
}
114114
Code::Delete | Code::Backspace => {
115115
self.grid_list.erase_highlighted();

src/widgets/toolbar.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,12 @@ impl ToolBarWidget {
127127
DrawingTools::JointFixer.to_string(),
128128
)
129129
.on_click(|ctx, data: &mut ApplicationState, _env| {
130+
let win_data = data
131+
.windows
132+
.get_mut(&ctx.window_id())
133+
.expect("Invalid WindowID");
130134
let tool = DrawingTools::JointFixer;
131-
data.mode = tool;
135+
win_data.mode = tool;
132136
ctx.submit_notification(BUTTON_HIGHLIGHT_COMMAND.with(tool.to_string()));
133137
ctx.set_handled();
134138
}),

0 commit comments

Comments
 (0)