Add small changes

This commit is contained in:
Alex 2017-08-18 10:52:58 +03:00
parent c9ec0df1d1
commit a3b64abc71

View file

@ -145,6 +145,7 @@ public class MeasurementToolFragment extends Fragment {
measurementLayer.setSelectedCachedPoint(selectedCachedPoint);
}
// Handling screen rotation
FragmentManager fragmentManager = mapActivity.getSupportFragmentManager();
Fragment selectedPointFragment = fragmentManager.findFragmentByTag(SelectedPointBottomSheetDialogFragment.TAG);
if (selectedPointFragment != null) {
@ -164,6 +165,11 @@ public class MeasurementToolFragment extends Fragment {
if (saveAsNewTrackFragment != null) {
((SaveAsNewTrackBottomSheetDialogFragment) saveAsNewTrackFragment).setListener(createSaveAsNewTrackFragmentListener());
}
// If rotate the screen from landscape to portrait when the list of points is displayed then
// the PointsListFragment will exist without view. This is necessary to remove it.
if (portrait) {
hidePointsListFragment();
}
commandManager.resetMeasurementLayer(measurementLayer);
iconsCache = mapActivity.getMyApplication().getIconsCache();
@ -434,12 +440,6 @@ public class MeasurementToolFragment extends Fragment {
enterMeasurementMode();
// If rotate the screen from landscape to portrait when the list of points is displayed then
// the PointsListFragment will exist without view. This is necessary to remove it.
if (portrait) {
hidePointsListFragment();
}
if (snapToRoadEnabled) {
enableSnapToRoadMode();
}