]> git.mxchange.org Git - flightgear.git/commitdiff
Fix some coastline issues.
authorJames Turner <zakalawe@mac.com>
Thu, 26 Nov 2015 23:44:27 +0000 (23:44 +0000)
committerJames Turner <zakalawe@mac.com>
Fri, 27 Nov 2015 23:02:42 +0000 (23:02 +0000)
src/GUI/BaseDiagram.cxx
src/GUI/BaseDiagram.hxx
src/GUI/QtLauncher.cxx

index 8626a67df78f21ce748db96db6eeb1bd81de3b75..4204626e502ba9d5037b6f0fc12dfd8661e381c5 100644 (file)
@@ -113,7 +113,7 @@ void BaseDiagram::paintEvent(QPaintEvent* pe)
     QTransform t(transform());
     p.setTransform(t);
 
-    paintCoastlines(&p);
+    paintPolygonData(&p);
 
     paintNavaids(&p);
 
@@ -135,7 +135,7 @@ void BaseDiagram::paintAirplaneIcon(QPainter* painter, const SGGeod& geod, int h
     painter->drawPixmap(airplaneIconRect, pix);
 }
 
-void BaseDiagram::paintCoastlines(QPainter* painter)
+void BaseDiagram::paintPolygonData(QPainter* painter)
 {
     QTransform xf = painter->transform();
     QTransform invT = xf.inverted();
index 153c0eda2471aaae7001c563a873dd4b9bf55f52..1ea041167172edd562325e5d262b07a4a9e6430a 100644 (file)
@@ -129,7 +129,7 @@ private:
     void paintNavaid(QPainter *painter,
                      const QTransform& t,
                      const FGPositionedRef &pos);
-    void paintCoastlines(QPainter *painter);
+    void paintPolygonData(QPainter *painter);
     void paintGeodVec(QPainter *painter, const flightgear::SGGeodVec &vec);
     void fillClosedGeodVec(QPainter *painter, const QColor &color, const flightgear::SGGeodVec &vec);
 };
index 583b2f2e1cf51589b3246cab751d53c06111284e..121b79d0ea969ee61015ec6c665abe14f4c3ba63 100644 (file)
@@ -352,6 +352,9 @@ void loadNaturalEarthFile(const std::string& aFileName,
     SGPath path(globals->get_fg_root());
     path.append( "Geodata" );
     path.append(aFileName);
+    if (!path.exists())
+        return; // silently fail for now
+
     flightgear::PolyLineList lines;
     flightgear::SHPParser::parsePolyLines(path, aType, lines, areClosed);
     flightgear::PolyLineList::iterator it;