Show track start finish icons by default

This commit is contained in:
Vitaliy 2020-07-08 13:03:28 +03:00
parent f178a292c1
commit 4eabba3489
2 changed files with 4 additions and 5 deletions

View file

@ -1605,11 +1605,10 @@ public class GPXUtilities {
} }
public boolean isShowStartFinish() { public boolean isShowStartFinish() {
String showStartFinish = null; if (extensions != null && extensions.containsKey("show_start_finish")) {
if (extensions != null) { return Boolean.parseBoolean(extensions.get("show_start_finish"));
showStartFinish = extensions.get("show_start_finish");
} }
return Boolean.parseBoolean(showStartFinish); return true;
} }
public void setShowStartFinish(boolean showStartFinish) { public void setShowStartFinish(boolean showStartFinish) {

View file

@ -443,7 +443,7 @@ public class GPXDatabase {
db.execSQL("UPDATE " + GPX_TABLE_NAME + " SET " + GPX_COL_SHOW_ARROWS + " = ? " + db.execSQL("UPDATE " + GPX_TABLE_NAME + " SET " + GPX_COL_SHOW_ARROWS + " = ? " +
"WHERE " + GPX_COL_SHOW_ARROWS + " IS NULL", new Object[]{0}); "WHERE " + GPX_COL_SHOW_ARROWS + " IS NULL", new Object[]{0});
db.execSQL("UPDATE " + GPX_TABLE_NAME + " SET " + GPX_COL_SHOW_START_FINISH + " = ? " + db.execSQL("UPDATE " + GPX_TABLE_NAME + " SET " + GPX_COL_SHOW_START_FINISH + " = ? " +
"WHERE " + GPX_COL_SHOW_START_FINISH + " IS NULL", new Object[]{0}); "WHERE " + GPX_COL_SHOW_START_FINISH + " IS NULL", new Object[]{1});
} }
db.execSQL("CREATE INDEX IF NOT EXISTS " + GPX_INDEX_NAME_DIR + " ON " + GPX_TABLE_NAME + " (" + GPX_COL_NAME + ", " + GPX_COL_DIR + ");"); db.execSQL("CREATE INDEX IF NOT EXISTS " + GPX_INDEX_NAME_DIR + " ON " + GPX_TABLE_NAME + " (" + GPX_COL_NAME + ", " + GPX_COL_DIR + ");");
} }