Fix update query; fix opening of old markers

This commit is contained in:
Alex 2017-10-17 13:09:03 +03:00 committed by Alexey Kulish
parent 529de80676
commit a6a7a98184
2 changed files with 3 additions and 3 deletions

View file

@ -30,7 +30,6 @@ import net.osmand.plus.R;
import net.osmand.plus.TargetPointsHelper.TargetPoint;
import net.osmand.plus.TargetPointsHelper.TargetPointChangedListener;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.dashboard.DashboardOnMap;
import net.osmand.plus.helpers.GpxUiHelper;
import net.osmand.plus.mapcontextmenu.MenuController.ContextMenuToolbarController;
import net.osmand.plus.mapcontextmenu.MenuController.MenuState;
@ -44,6 +43,7 @@ import net.osmand.plus.mapcontextmenu.editors.RtePtEditor;
import net.osmand.plus.mapcontextmenu.editors.WptPtEditor;
import net.osmand.plus.mapcontextmenu.other.MapMultiSelectionMenu;
import net.osmand.plus.mapcontextmenu.other.ShareMenu;
import net.osmand.plus.mapmarkers.MapMarkersDialogFragment;
import net.osmand.plus.monitoring.OsmandMonitoringPlugin;
import net.osmand.plus.routing.RoutingHelper;
import net.osmand.plus.views.ContextMenuLayer;
@ -717,7 +717,7 @@ public class MapContextMenu extends MenuTitleController implements StateChangedL
if (pointDescription.isMapMarker()) {
hide();
MapActivity.clearPrevActivityIntent();
mapActivity.getDashboard().setDashboardVisibility(true, DashboardOnMap.DashboardType.MAP_MARKERS);
MapMarkersDialogFragment.showInstance(mapActivity);
} else {
mapActivity.getMapActions().addMapMarker(latLon.getLatitude(), latLon.getLongitude(),
getPointDescriptionForMarker());

View file

@ -140,7 +140,7 @@ public class MapMarkersDbHelper {
if (oldVersion < 10) {
db.execSQL("ALTER TABLE " + MARKERS_TABLE_NAME + " ADD " + MARKERS_COL_SELECTED + " int");
db.execSQL("UPDATE " + MARKERS_TABLE_NAME +
" SET" + MARKERS_COL_SELECTED + " = ? " +
" SET " + MARKERS_COL_SELECTED + " = ? " +
"WHERE " + MARKERS_COL_SELECTED + " IS NULL", new Object[]{0});
}
}