Merge pull request #11372 from osmandapp/Plan-route-show-hide

Plan route show hide
This commit is contained in:
Vitaliy 2021-04-11 13:27:37 +03:00 committed by GitHub
commit 236f4c05b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 7 deletions

View file

@ -852,9 +852,9 @@ public class TrackMenuFragment extends ContextMenuScrollFragment implements Card
osmEditingPlugin.sendGPXFiles(mapActivity, this, gpxInfo); osmEditingPlugin.sendGPXFiles(mapActivity, this, gpxInfo);
} }
} else if (buttonIndex == EDIT_BUTTON_INDEX) { } else if (buttonIndex == EDIT_BUTTON_INDEX) {
dismiss();
String fileName = Algorithms.getFileWithoutDirs(gpxFile.path); String fileName = Algorithms.getFileWithoutDirs(gpxFile.path);
MeasurementToolFragment.showInstance(mapActivity.getSupportFragmentManager(), fileName); MeasurementToolFragment.showInstance(mapActivity.getSupportFragmentManager(), fileName);
dismiss();
} else if (buttonIndex == RENAME_BUTTON_INDEX) { } else if (buttonIndex == RENAME_BUTTON_INDEX) {
FileUtils.renameFile(mapActivity, new File(gpxFile.path), this, true); FileUtils.renameFile(mapActivity, new File(gpxFile.path), this, true);
} else if (buttonIndex == CHANGE_FOLDER_BUTTON_INDEX) { } else if (buttonIndex == CHANGE_FOLDER_BUTTON_INDEX) {

View file

@ -21,10 +21,10 @@ import java.lang.ref.WeakReference;
public class WidgetsVisibilityHelper { public class WidgetsVisibilityHelper {
private MapActivity mapActivity; private final MapActivity mapActivity;
private OsmandSettings settings; private final OsmandSettings settings;
private RoutingHelper routingHelper; private final RoutingHelper routingHelper;
private MapActivityLayers mapLayers; private final MapActivityLayers mapLayers;
public WidgetsVisibilityHelper(@NonNull MapActivity mapActivity) { public WidgetsVisibilityHelper(@NonNull MapActivity mapActivity) {
this.mapActivity = mapActivity; this.mapActivity = mapActivity;
@ -104,7 +104,6 @@ public class WidgetsVisibilityHelper {
public boolean shouldHideCompass() { public boolean shouldHideCompass() {
return mapActivity.shouldHideTopControls() return mapActivity.shouldHideTopControls()
|| isTrackDetailsMenuOpened() || isTrackDetailsMenuOpened()
|| isInMeasurementToolMode()
|| isInPlanRouteMode() || isInPlanRouteMode()
|| isInChoosingRoutesMode() || isInChoosingRoutesMode()
|| isInTrackAppearanceMode() || isInTrackAppearanceMode()
@ -116,7 +115,6 @@ public class WidgetsVisibilityHelper {
public boolean shouldShowTopButtons() { public boolean shouldShowTopButtons() {
return !mapActivity.shouldHideTopControls() return !mapActivity.shouldHideTopControls()
&& !isTrackDetailsMenuOpened() && !isTrackDetailsMenuOpened()
&& !isInMeasurementToolMode()
&& !isInPlanRouteMode() && !isInPlanRouteMode()
&& !isInChoosingRoutesMode() && !isInChoosingRoutesMode()
&& !isInTrackAppearanceMode() && !isInTrackAppearanceMode()