Honor saved border/city color everywhere in viewer

This commit is contained in:
Jamie Vital 2023-10-14 13:06:21 -04:00
parent 83b26bb9f3
commit 45b860a28f
7 changed files with 23 additions and 25 deletions

View file

@ -68,7 +68,7 @@ namespace satdump
{
auto proj_func = satdump::reprojection::setupProjectionFunction(current_img.width(), current_img.height(), current_image_proj, {});
logger->info("Drawing map overlay...");
unsigned short color[3] = {(unsigned short)(color_borders.x * 65535.0f), (unsigned short)(color_borders.y * 65535.0f), (unsigned short)(color_borders.z * 65535.0f)};
unsigned short color[3] = {(unsigned short)(viewer_color_borders.x * 65535.0f), (unsigned short)(viewer_color_borders.y * 65535.0f), (unsigned short)(viewer_color_borders.z * 65535.0f)};
map::drawProjectedMapShapefile({resources::getResourcePath("maps/ne_10m_admin_0_countries.shp")},
current_img,
color,
@ -157,7 +157,7 @@ namespace satdump
if (ImGui::Checkbox("Borders", &map_overlay))
update();
ImGui::SameLine();
ImGui::ColorEdit3("##borders", (float *)&color_borders, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_NoLabel);
ImGui::ColorEdit3("##borders", (float *)&viewer_color_borders, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_NoLabel);
if (selected_visualization_id != 1)
style::endDisabled();
}