Fix filter groups
This commit is contained in:
parent
253519e861
commit
09177f90b2
2 changed files with 17 additions and 24 deletions
|
@ -322,11 +322,9 @@ public class SplitSegmentFragment extends OsmAndListFragment {
|
|||
}
|
||||
|
||||
private List<GpxDisplayGroup> filterGroups(boolean useDisplayGroups) {
|
||||
if (getTrackActivity() == null) {
|
||||
return null;
|
||||
}
|
||||
List<GpxDisplayGroup> result = getTrackActivity().getGpxFile(useDisplayGroups);
|
||||
List<GpxDisplayGroup> groups = new ArrayList<>();
|
||||
if (getTrackActivity() != null) {
|
||||
List<GpxDisplayGroup> result = getTrackActivity().getGpxFile(useDisplayGroups);
|
||||
for (GpxDisplayGroup group : result) {
|
||||
boolean add = hasFilterType(group.getType());
|
||||
if (isArgumentTrue(ARG_TO_FILTER_SHORT_TRACKS)) {
|
||||
|
@ -346,6 +344,7 @@ public class SplitSegmentFragment extends OsmAndListFragment {
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
return groups;
|
||||
}
|
||||
|
||||
|
@ -657,9 +656,6 @@ public class SplitSegmentFragment extends OsmAndListFragment {
|
|||
}
|
||||
if (mSelectedGpxFile != null) {
|
||||
List<GpxDisplayGroup> groups = getDisplayGroups();
|
||||
if (groups == null) {
|
||||
return;
|
||||
}
|
||||
mSelectedGpxFile.setDisplayGroups(groups);
|
||||
}
|
||||
updateContent();
|
||||
|
|
|
@ -1541,9 +1541,6 @@ public class TrackSegmentFragment extends OsmAndListFragment {
|
|||
}
|
||||
if (mSelectedGpxFile != null) {
|
||||
List<GpxDisplayGroup> groups = getDisplayGroups();
|
||||
if (groups == null) {
|
||||
return;
|
||||
}
|
||||
mSelectedGpxFile.setDisplayGroups(groups);
|
||||
}
|
||||
if (mFragment.isVisible()) {
|
||||
|
|
Loading…
Reference in a new issue