[gpx] Save bookmark color to gpx export (#11238)

* [gpx] Save bookmark color to gpx export
* [gpx] Code-review fixes
* [gpx] Use m_rgba to store initial color, reset on predefined color change
* [gpx] Move MapPredefinedColor to color parser
* [gpx] Adjust naming

Signed-off-by: cyber-toad <the.cyber.toad@proton.me>
This commit is contained in:
cyber-toad
2025-09-02 12:30:43 +02:00
committed by Konstantin Pastbin
parent bf79f7a95c
commit fd342c2a17
9 changed files with 186 additions and 69 deletions

View File

@@ -58,6 +58,7 @@ std::string GetBookmarkIconType(kml::BookmarkIcon const & icon)
std::string const kCustomImageProperty = "CustomImage";
std::string const kHasElevationProfileProperty = "has_elevation_profile";
int constexpr kInvalidColor = 0;
} // namespace
Bookmark::Bookmark(m2::PointD const & ptOrg) : Base(ptOrg, UserMark::BOOKMARK), m_groupId(kml::kInvalidMarkGroupId)
@@ -185,6 +186,7 @@ void Bookmark::SetColor(kml::PredefinedColor color)
{
SetDirty();
m_data.m_color.m_predefinedColor = color;
m_data.m_color.m_rgba = kInvalidColor;
}
std::string Bookmark::GetPreferredName() const