This commit is contained in:
PavelRatushny 2017-09-05 10:28:06 +03:00
parent d4fcfc7b49
commit b4add50e78

View file

@ -222,6 +222,7 @@ public class SplitSegmentDialogFragment extends DialogFragment {
}
public void updateContent() {
if (getTrackActivity() != null) {
adapter.clear();
adapter.setNotifyOnChange(false);
GpxDisplayItem overviewSegments = getOverviewSegment();
@ -233,6 +234,7 @@ public class SplitSegmentDialogFragment extends DialogFragment {
headerView.setTranslationY(0);
updateHeader();
}
}
private void updateSplit(List<GpxDisplayGroup> groups, GpxSelectionHelper.SelectedGpxFile sf) {
new SplitTrackAsyncTask(sf, groups).execute((Void) null);
@ -682,10 +684,8 @@ public class SplitSegmentDialogFragment extends DialogFragment {
List<GpxDisplayGroup> groups = getDisplayGroups();
mSelectedGpxFile.setDisplayGroups(groups);
}
if (getTrackActivity() != null) {
updateContent();
}
}
@Override
protected Void doInBackground(Void... params) {