diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java index b281e85f84..e12d162e6e 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java @@ -69,9 +69,9 @@ public class WikivoyageArticleDialogFragment extends WikiArticleBaseDialogFragme private static final String SELECTED_LANG_KEY = "selected_lang"; private static final String EMPTY_URL = "https://upload.wikimedia.org/wikipedia/commons/thumb/d/d4//"; - + private static final int MENU_ITEM_SHARE = 0; - + private TravelArticleIdentifier articleId; private ArrayList langs; private String selectedLang; @@ -256,6 +256,8 @@ public class WikivoyageArticleDialogFragment extends WikiArticleBaseDialogFragme public void onClick(View view) { if (article != null) { if (saved) { + GPXFile gpxFile = article.getGpxFile(); + getMyApplication().getSelectedGpxHelper().selectGpxFile(gpxFile, false, true); helper.removeArticleFromSaved(article); } else { getMyApplication().getTravelHelper().createGpxFile(article); diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/ArticleTravelCard.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/ArticleTravelCard.java index b955273d01..92bbe1af95 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/ArticleTravelCard.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/travelcards/ArticleTravelCard.java @@ -13,6 +13,7 @@ import com.squareup.picasso.Callback; import com.squareup.picasso.Picasso; import com.squareup.picasso.RequestCreator; +import net.osmand.GPXUtilities; import net.osmand.PicassoUtils; import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; @@ -102,10 +103,12 @@ public class ArticleTravelCard extends BaseTravelCard { public void onClick(View view) { if (article != null) { if (saved) { + GPXUtilities.GPXFile gpxFile = article.getGpxFile(); + app.getSelectedGpxHelper().selectGpxFile(gpxFile, false, true); helper.removeArticleFromSaved(article); } else { - app.getTravelHelper().createGpxFile(article); helper.addArticleToSaved(article); + app.getTravelHelper().createGpxFile(article); } updateSaveButton(holder); }