Panning feature looked broken to some users since auto-center is enabled
by default which blocks panning. center-on-aircraft is now disabled
automatically when view is panned.
_zoom = 6;
_width = maxX - x;
_height = maxY - y;
+ _hasPanned = false;
MapData::setFont(legendFont);
MapData::setPalette(colour);
void MapWidget::pan(const SGVec2d& delta)
{
+ _hasPanned = true;
_projectionCenter = unproject(-delta);
}
fgGetDouble("/position/latitude-deg"));
_magneticHeadings = _root->getBoolValue("magnetic-headings");
+ if (_hasPanned)
+ {
+ _root->setBoolValue("centre-on-aircraft", false);
+ _hasPanned = false;
+ }
+ else
if (_root->getBoolValue("centre-on-aircraft")) {
_projectionCenter = _aircraft;
}
double _drawRangeNm;
double _upHeading; // true heading corresponding to +ve y-axis
bool _magneticHeadings;
+ bool _hasPanned;
SGGeod _projectionCenter;
SGGeod _aircraft;