diff --git a/help/en/index.html b/help/en/index.html index 2922c64cc..5cc95163c 100644 --- a/help/en/index.html +++ b/help/en/index.html @@ -6,7 +6,7 @@ - + Little Navmap User Manual @@ -1008,6 +1008,39 @@ <h4> distance. </p> + <p> + The aircraft centering will be switched off when using one of the following functions: + <br /> + </p> + + <ul> + <li>Double click into a table view or map display to zoom to an airport or a navaid. + </li> + + <li>Context menu item <code>Show on map</code>. + </li> + + <li> + <code>Goto Home</code> or <code>Goto Center for Distance Search</code>. + </li> + + <li> + <code>Map</code> link in <code>Information</code> dock window. + </li> + + <li> + <code>Show Flight Plan</code> plan. Either manually in a menu item or after loading. + </li> + + <li>Centering a Google Earth KML/KMZ file after loading + </li> + </ul> + + <p> + This allows to have a quick look at an airport or navaid during flight. To get back to the aircraft use <code>Map + Position Back</code> and enable <code>Show Aircraft</code> again. + </p> + <h4> <img class="textimg" alt="Show Aircraft Trail" title="Show Aircraft Trail" src= "images/icons/aircrafttrail.png" /> Show Aircraft Trail @@ -3066,7 +3099,7 @@ <h2 id="h2license"> <br /> <br /> <br /> - Last update 2016-10-14 + Last update 2016-10-15 </p> </body> </html> diff --git a/src/mapgui/mapwidget.cpp b/src/mapgui/mapwidget.cpp index f8e633433..29901f2e3 100644 --- a/src/mapgui/mapwidget.cpp +++ b/src/mapgui/mapwidget.cpp @@ -300,6 +300,7 @@ void MapWidget::historyNext() centerOn(entry.getPos().getLonX(), entry.getPos().getLatY(), false); changedByHistory = true; mainWindow->setStatusMessage(tr("Map position history next.")); + showAircraft(false); } } @@ -312,6 +313,7 @@ void MapWidget::historyBack() centerOn(entry.getPos().getLonX(), entry.getPos().getLatY(), false); changedByHistory = true; mainWindow->setStatusMessage(tr("Map position history back.")); + showAircraft(false); } } @@ -440,6 +442,7 @@ void MapWidget::showPos(const atools::geo::Pos& pos, int distanceNm) { // qDebug() << "NavMapWidget::showPoint" << pos; hideTooltip(); + showAircraft(false); if(distanceNm == -1) setDistance(atools::geo::nmToKm(OptionData::instance().getMapZoomShow())); @@ -452,6 +455,7 @@ void MapWidget::showRect(const atools::geo::Rect& rect) { // qDebug() << "NavMapWidget::showRect" << rect; hideTooltip(); + showAircraft(false); qDebug() << "rect w" << QString::number(rect.getWidthDegree(), 'f') << "h" << QString::number(rect.getHeightDegree(), 'f'); @@ -468,6 +472,7 @@ void MapWidget::showSearchMark() qDebug() << "NavMapWidget::showMark" << searchMarkPos; hideTooltip(); + showAircraft(false); if(searchMarkPos.isValid()) { @@ -481,6 +486,11 @@ void MapWidget::showAircraft(bool centerAircraftChecked) { qDebug() << "NavMapWidget::showAircraft" << searchMarkPos; + // Adapt the menu item status if this method was not called by the action + mainWindow->getUi()->actionMapAircraftCenter->blockSignals(true); + mainWindow->getUi()->actionMapAircraftCenter->setChecked(centerAircraftChecked); + mainWindow->getUi()->actionMapAircraftCenter->blockSignals(false); + if(centerAircraftChecked && simData.getPosition().isValid()) centerOn(simData.getPosition().getLonX(), simData.getPosition().getLatY(), false); } @@ -490,7 +500,7 @@ void MapWidget::showHome() qDebug() << "NavMapWidget::showHome" << searchMarkPos; hideTooltip(); - + showAircraft(false); if(!atools::almostEqual(homeDistance, 0.)) // Only center position is valid setDistance(homeDistance); @@ -1951,8 +1961,11 @@ bool MapWidget::loadKml(const QString& filename, bool center) if(!kmlString.isEmpty() && kmlString.startsWith("<?xml") && kmlString.endsWith("</kml>")) { if(center && OptionData::instance().getFlags() & opts::GUI_CENTER_KML) + { // add file always centers model()->addGeoDataFile(filename); + showAircraft(false); + } else // Have to read the data ourselves to avoid centering on startup model()->addGeoDataString(kmlString, filename);