Skip to content

Commit 1bd6d7a

Browse files
committed
1. In mark out task reticle button doesn't erase make out circle.
2. During reset, Next, fast and best registration button will disable. After reset done, next button will return to before reset status.
1 parent 146ca5e commit 1bd6d7a

File tree

3 files changed

+45
-3
lines changed

3 files changed

+45
-3
lines changed

GUI.m

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -712,16 +712,23 @@ function ResetViewButtonPressed(hObj, eventdata, handles) %#ok<DEFNU>
712712

713713
myData = handles.myData;
714714
taskinfo = myData.tasks_out{myData.iter};
715-
set(handles.NextButton,'Enable', 'off');
716715
% Redraw the Image from the Temporary Image Folder
717-
taskimage_load(hObj);
716+
%taskimage_load(hObj);
718717
handles = guidata(hObj);
719718

720719
switch myData.mode_desc
721720
case 'MicroRT'
722721

723722
target_pos = [taskinfo.stage_x, taskinfo.stage_y];
723+
currentNextStatus = get(handles.NextButton,'enable');
724+
set(handles.NextButton,'enable','off');
725+
set(handles.Fast_Register_Button,'enable','off');
726+
set(handles.Best_Register_Button,'enable','off');
724727
handles.myData.stage = stage_move(handles.myData.stage,target_pos,handles.myData.stage.handle);
728+
set(handles.NextButton,'enable',currentNextStatus);
729+
set(handles.Fast_Register_Button,'enable','on');
730+
set(handles.Best_Register_Button,'enable','on');
731+
725732
end
726733

727734
% myData.tasks_out{myData.iter} = taskinfo;
@@ -1150,6 +1157,13 @@ function Reticlebutton_Callback(hObject, eventdata, handles)
11501157
end
11511158
guidata(handles.GUI, handles);
11521159
taskimage_load(hObject);
1153-
set(handles.NextButton,'Enable', 'off');
1160+
handles = guidata(hObject);
1161+
st = dbstack;
1162+
taskinfo = handles.myData.tasks_out{handles.myData.iter};
1163+
taskinfo.calling_function = st(1).name;
1164+
handles.myData.taskinfo = taskinfo;
1165+
guidata(handles.GUI, handles);
1166+
taskinfo.task_handle(handles.GUI);
1167+
%set(handles.NextButton,'Enable', 'off');
11541168

11551169
end

tasks/task_mark1.m

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,20 @@ function task_mark1(hObj)
169169
% Pack the results
170170
myData.tasks_out{handles.myData.iter} = taskinfo;
171171

172+
173+
case 'Reticlebutton_Callback' % keep mark result after hide/show reticle
174+
if handles.panning_Zooming_Tool.markexists==1
175+
textROIX= get(handles.textROIX);
176+
textROIY= get(handles.textROIY);
177+
x = str2num(textROIX.String);
178+
y = str2num(textROIY.String);
179+
handles.panning_Zooming_Tool.mark = rectangle('Position',...
180+
[x-40,y-40,80,80],'Curvature',[1,1],...
181+
'LineWidth',4,'LineStyle','--','EdgeColor','r','Tag','mark');
182+
handles.panning_Zooming_Tool.markexists=1;
183+
end
184+
185+
172186
case {'NextButtonPressed', ...
173187
'PauseButtonPressed',...
174188
'Backbutton_Callback'} % Clean up the task elements

tasks/task_mark1_out.m

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,20 @@ function task_mark1_out(hObj)
170170
% Pack the results
171171
myData.tasks_out{handles.myData.iter} = taskinfo;
172172

173+
174+
case 'Reticlebutton_Callback' % keep mark result after hide/show reticle
175+
if handles.panning_Zooming_Tool.markexists==1
176+
textROIX= get(handles.textROIX);
177+
textROIY= get(handles.textROIY);
178+
x = str2num(textROIX.String);
179+
y = str2num(textROIY.String);
180+
handles.panning_Zooming_Tool.mark = rectangle('Position',...
181+
[x-40,y-40,80,80],'Curvature',[1,1],...
182+
'LineWidth',4,'LineStyle','--','EdgeColor','r','Tag','mark');
183+
handles.panning_Zooming_Tool.markexists=1;
184+
end
185+
186+
173187
case {'NextButtonPressed', ...
174188
'PauseButtonPressed',...
175189
'Backbutton_Callback'} % Clean up the task elements

0 commit comments

Comments
 (0)