Fix some coastline issues.
This commit is contained in:
parent
bfb539f090
commit
242e79f5e9
3 changed files with 6 additions and 3 deletions
|
@ -113,7 +113,7 @@ void BaseDiagram::paintEvent(QPaintEvent* pe)
|
||||||
QTransform t(transform());
|
QTransform t(transform());
|
||||||
p.setTransform(t);
|
p.setTransform(t);
|
||||||
|
|
||||||
paintCoastlines(&p);
|
paintPolygonData(&p);
|
||||||
|
|
||||||
paintNavaids(&p);
|
paintNavaids(&p);
|
||||||
|
|
||||||
|
@ -135,7 +135,7 @@ void BaseDiagram::paintAirplaneIcon(QPainter* painter, const SGGeod& geod, int h
|
||||||
painter->drawPixmap(airplaneIconRect, pix);
|
painter->drawPixmap(airplaneIconRect, pix);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BaseDiagram::paintCoastlines(QPainter* painter)
|
void BaseDiagram::paintPolygonData(QPainter* painter)
|
||||||
{
|
{
|
||||||
QTransform xf = painter->transform();
|
QTransform xf = painter->transform();
|
||||||
QTransform invT = xf.inverted();
|
QTransform invT = xf.inverted();
|
||||||
|
|
|
@ -129,7 +129,7 @@ private:
|
||||||
void paintNavaid(QPainter *painter,
|
void paintNavaid(QPainter *painter,
|
||||||
const QTransform& t,
|
const QTransform& t,
|
||||||
const FGPositionedRef &pos);
|
const FGPositionedRef &pos);
|
||||||
void paintCoastlines(QPainter *painter);
|
void paintPolygonData(QPainter *painter);
|
||||||
void paintGeodVec(QPainter *painter, const flightgear::SGGeodVec &vec);
|
void paintGeodVec(QPainter *painter, const flightgear::SGGeodVec &vec);
|
||||||
void fillClosedGeodVec(QPainter *painter, const QColor &color, const flightgear::SGGeodVec &vec);
|
void fillClosedGeodVec(QPainter *painter, const QColor &color, const flightgear::SGGeodVec &vec);
|
||||||
};
|
};
|
||||||
|
|
|
@ -352,6 +352,9 @@ void loadNaturalEarthFile(const std::string& aFileName,
|
||||||
SGPath path(globals->get_fg_root());
|
SGPath path(globals->get_fg_root());
|
||||||
path.append( "Geodata" );
|
path.append( "Geodata" );
|
||||||
path.append(aFileName);
|
path.append(aFileName);
|
||||||
|
if (!path.exists())
|
||||||
|
return; // silently fail for now
|
||||||
|
|
||||||
flightgear::PolyLineList lines;
|
flightgear::PolyLineList lines;
|
||||||
flightgear::SHPParser::parsePolyLines(path, aType, lines, areClosed);
|
flightgear::SHPParser::parsePolyLines(path, aType, lines, areClosed);
|
||||||
flightgear::PolyLineList::iterator it;
|
flightgear::PolyLineList::iterator it;
|
||||||
|
|
Loading…
Reference in a new issue