Skip to content

Commit cbb274c

Browse files
committed
more consistent check for empty hObject / objectTag in PlanWidget
1 parent a44bbc1 commit cbb274c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

matRad/gui/widgets/matRad_PlanWidget.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -970,9 +970,9 @@ function updatePlnInWorkspace(this,hObject,evtData)
970970
pln.propStf.gantryAngles = this.parseStringAsNum(get(handles.editGantryAngle,'String'),true); % [°]
971971
pln.propStf.couchAngles = this.parseStringAsNum(get(handles.editCouchAngle,'String'),true); % [°]
972972

973-
objectTag = get(hObject,'Tag');
973+
objectTag = get(hObject,'Tag'); % Returns empty if hObject is empty, no check required
974974

975-
if ~isempty(hObject) && (strcmp(objectTag,'editGantryAngle')||strcmp(objectTag,'editCouchAngle'))
975+
if ~isempty(objectTag) && (strcmp(objectTag,'editGantryAngle')||strcmp(objectTag,'editCouchAngle'))
976976
if numel(this.parseStringAsNum(get(handles.editCouchAngle,'String'),true))<numel(this.parseStringAsNum(get(handles.editGantryAngle,'String'),true)) % Feature: autofill couch angles to single plane by entering a single value
977977
couchGantryDifference = numel(this.parseStringAsNum(get(handles.editGantryAngle,'String'),true))-numel(this.parseStringAsNum(get(handles.editCouchAngle,'String'),true));
978978
pln.propStf.couchAngles = [this.parseStringAsNum(get(handles.editCouchAngle,'String'),true) zeros(1,couchGantryDifference)];

0 commit comments

Comments
 (0)