Stupid mistake with world_map.bin detection

This commit is contained in:
furrtek 2017-10-14 11:33:41 +01:00
parent f00125879d
commit 04c5b4d607
2 changed files with 6 additions and 6 deletions

View File

@ -211,7 +211,7 @@ void GeoMap::draw_bearing(const Point origin, const uint32_t angle, uint32_t siz
void GeoMapView::focus() { void GeoMapView::focus() {
geopos.focus(); geopos.focus();
if (!file_error) if (!map_opened)
nav_.display_modal("No map", "No world_map.bin file in\n/ADSB/ directory", ABORT, nullptr); nav_.display_modal("No map", "No world_map.bin file in\n/ADSB/ directory", ABORT, nullptr);
} }
@ -280,8 +280,8 @@ GeoMapView::GeoMapView(
add_child(&geopos); add_child(&geopos);
file_error = !geomap.init(); map_opened = geomap.init();
if (file_error) return; if (!map_opened) return;
setup(); setup();
@ -308,8 +308,8 @@ GeoMapView::GeoMapView(
add_child(&geopos); add_child(&geopos);
file_error = !geomap.init(); map_opened = geomap.init();
if (file_error) return; if (!map_opened) return;
setup(); setup();
add_child(&button_ok); add_child(&button_ok);

View File

@ -172,7 +172,7 @@ private:
float angle_ { }; float angle_ { };
std::function<void(void)> on_close_ { nullptr }; std::function<void(void)> on_close_ { nullptr };
bool file_error { }; bool map_opened { };
GeoPos geopos { GeoPos geopos {
{ 0, 0 } { 0, 0 }