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

View file

@ -222,16 +222,18 @@ public class SplitSegmentDialogFragment extends DialogFragment {
}
public void updateContent() {
adapter.clear();
adapter.setNotifyOnChange(false);
GpxDisplayItem overviewSegments = getOverviewSegment();
adapter.add(overviewSegments);
List<GpxDisplayItem> splitSegments = getSplitSegments();
adapter.addAll(splitSegments);
adapter.notifyDataSetChanged();
listView.setSelection(0);
headerView.setTranslationY(0);
updateHeader();
if (getTrackActivity() != null) {
adapter.clear();
adapter.setNotifyOnChange(false);
GpxDisplayItem overviewSegments = getOverviewSegment();
adapter.add(overviewSegments);
List<GpxDisplayItem> splitSegments = getSplitSegments();
adapter.addAll(splitSegments);
adapter.notifyDataSetChanged();
listView.setSelection(0);
headerView.setTranslationY(0);
updateHeader();
}
}
private void updateSplit(List<GpxDisplayGroup> groups, GpxSelectionHelper.SelectedGpxFile sf) {
@ -682,9 +684,7 @@ public class SplitSegmentDialogFragment extends DialogFragment {
List<GpxDisplayGroup> groups = getDisplayGroups();
mSelectedGpxFile.setDisplayGroups(groups);
}
if (getTrackActivity() != null) {
updateContent();
}
updateContent();
}
@Override