Skip to content

Commit 485046b

Browse files
committed
Fixed arrow key bug
Fixed bug where direction changes lagged arrow key press direction
1 parent ba0f264 commit 485046b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Browsing Functions/allen_ccf_npx.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ function key_press(probe_atlas_gui,eventdata)
151151
angle_change = [0;-1];
152152
new_angle = gui_data.probe_angle + angle_change;
153153
gui_data.probe_angle = new_angle;
154+
guidata(probe_atlas_gui, gui_data);
154155
update_probe_angle(probe_atlas_gui);
155156
elseif any(strcmp(eventdata.Modifier,'alt'))
156157
% Alt-up: raise probe
@@ -177,6 +178,7 @@ function key_press(probe_atlas_gui,eventdata)
177178
angle_change = [0;1];
178179
new_angle = gui_data.probe_angle + angle_change;
179180
gui_data.probe_angle = new_angle;
181+
guidata(probe_atlas_gui, gui_data);
180182
update_probe_angle(probe_atlas_gui);
181183
elseif any(strcmp(eventdata.Modifier,'alt'))
182184
% Alt-down: lower probe
@@ -203,6 +205,7 @@ function key_press(probe_atlas_gui,eventdata)
203205
angle_change = [1;0];
204206
new_angle = gui_data.probe_angle + angle_change;
205207
gui_data.probe_angle = new_angle;
208+
guidata(probe_atlas_gui, gui_data);
206209
update_probe_angle(probe_atlas_gui);
207210
end
208211

@@ -217,6 +220,7 @@ function key_press(probe_atlas_gui,eventdata)
217220
angle_change = [-1;0];
218221
new_angle = gui_data.probe_angle + angle_change;
219222
gui_data.probe_angle = new_angle;
223+
guidata(probe_atlas_gui, gui_data);
220224
update_probe_angle(probe_atlas_gui);
221225
end
222226

0 commit comments

Comments
 (0)