diff --git a/OsmAnd/src/net/osmand/plus/track/TrackMenuFragment.java b/OsmAnd/src/net/osmand/plus/track/TrackMenuFragment.java index 4e5e6f6e0c..23bcd0d99b 100644 --- a/OsmAnd/src/net/osmand/plus/track/TrackMenuFragment.java +++ b/OsmAnd/src/net/osmand/plus/track/TrackMenuFragment.java @@ -852,9 +852,9 @@ public class TrackMenuFragment extends ContextMenuScrollFragment implements Card osmEditingPlugin.sendGPXFiles(mapActivity, this, gpxInfo); } } else if (buttonIndex == EDIT_BUTTON_INDEX) { + dismiss(); String fileName = Algorithms.getFileWithoutDirs(gpxFile.path); MeasurementToolFragment.showInstance(mapActivity.getSupportFragmentManager(), fileName); - dismiss(); } else if (buttonIndex == RENAME_BUTTON_INDEX) { FileUtils.renameFile(mapActivity, new File(gpxFile.path), this, true); } else if (buttonIndex == CHANGE_FOLDER_BUTTON_INDEX) { diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/WidgetsVisibilityHelper.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/WidgetsVisibilityHelper.java index 4c538ddba1..72d8814a80 100644 --- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/WidgetsVisibilityHelper.java +++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/WidgetsVisibilityHelper.java @@ -21,10 +21,10 @@ import java.lang.ref.WeakReference; public class WidgetsVisibilityHelper { - private MapActivity mapActivity; - private OsmandSettings settings; - private RoutingHelper routingHelper; - private MapActivityLayers mapLayers; + private final MapActivity mapActivity; + private final OsmandSettings settings; + private final RoutingHelper routingHelper; + private final MapActivityLayers mapLayers; public WidgetsVisibilityHelper(@NonNull MapActivity mapActivity) { this.mapActivity = mapActivity; @@ -104,7 +104,6 @@ public class WidgetsVisibilityHelper { public boolean shouldHideCompass() { return mapActivity.shouldHideTopControls() || isTrackDetailsMenuOpened() - || isInMeasurementToolMode() || isInPlanRouteMode() || isInChoosingRoutesMode() || isInTrackAppearanceMode() @@ -116,7 +115,6 @@ public class WidgetsVisibilityHelper { public boolean shouldShowTopButtons() { return !mapActivity.shouldHideTopControls() && !isTrackDetailsMenuOpened() - && !isInMeasurementToolMode() && !isInPlanRouteMode() && !isInChoosingRoutesMode() && !isInTrackAppearanceMode()