File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ impl Widget<ApplicationState> for CanvasGrid {
109
109
win_data. mode = DrawingTools :: Eraser ;
110
110
}
111
111
Code :: Digit5 => {
112
- data . mode = DrawingTools :: JointFixer ;
112
+ win_data . mode = DrawingTools :: JointFixer ;
113
113
}
114
114
Code :: Delete | Code :: Backspace => {
115
115
self . grid_list . erase_highlighted ( ) ;
Original file line number Diff line number Diff line change @@ -127,8 +127,12 @@ impl ToolBarWidget {
127
127
DrawingTools :: JointFixer . to_string ( ) ,
128
128
)
129
129
. on_click ( |ctx, data : & mut ApplicationState , _env| {
130
+ let win_data = data
131
+ . windows
132
+ . get_mut ( & ctx. window_id ( ) )
133
+ . expect ( "Invalid WindowID" ) ;
130
134
let tool = DrawingTools :: JointFixer ;
131
- data . mode = tool;
135
+ win_data . mode = tool;
132
136
ctx. submit_notification ( BUTTON_HIGHLIGHT_COMMAND . with ( tool. to_string ( ) ) ) ;
133
137
ctx. set_handled ( ) ;
134
138
} ) ,
You can’t perform that action at this time.
0 commit comments