function deleteUnusedStagesItem_Callback(hObject, eventdata)
    handles = guidata( hObject );
    if isempty( handles.mesh )
        return;
    end
	if isempty(handles.mesh.globalProps.projectdir)
        complain( 'No project.' );
        return;
    end
    handles.mesh = leaf_deletestages( handles.mesh, 'stages', false, 'times', true );
    handles = remakeStageMenu( handles );
    guidata( handles.output, handles );

