Skip to content

Commit

Permalink
Added new userpoint type lighthouse.
Browse files Browse the repository at this point in the history
Increased user point size on lower map layers.
Fixed wrong warning message if no active route leg present.
  • Loading branch information
albar965 committed Aug 26, 2019
1 parent d1bd22e commit 675d523
Show file tree
Hide file tree
Showing 6 changed files with 343 additions and 227 deletions.
435 changes: 218 additions & 217 deletions littlenavmap.qrc

Large diffs are not rendered by default.

112 changes: 112 additions & 0 deletions resources/icons/userpoint_Lighthouse.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions src/mappainter/mappaintlayer.cpp
Expand Up @@ -216,7 +216,7 @@ void MapPaintLayer::initMapLayerSettings()
ndbSymbolSize(24).ndbIdent().ndbInfo().
ilsIdent().ilsInfo().
airwayIdent().airwayInfo().airwayWaypoint().
userpoint().userpointInfo().userpoinSymbolSize(24).userpointMaxTextLength(30).
userpoint().userpointInfo().userpoinSymbolSize(28).userpointMaxTextLength(30).
markerSymbolSize(24).markerInfo().
airportMaxTextLength(30)).

Expand All @@ -228,7 +228,7 @@ void MapPaintLayer::initMapLayerSettings()
ndbSymbolSize(24).ndbIdent().ndbInfo().
ilsIdent().ilsInfo().
airwayIdent().airwayInfo().airwayWaypoint().
userpoint().userpointInfo().userpoinSymbolSize(24).userpointMaxTextLength(30).
userpoint().userpointInfo().userpoinSymbolSize(28).userpointMaxTextLength(30).
markerSymbolSize(24).markerInfo().
airportMaxTextLength(30)).

Expand All @@ -242,7 +242,7 @@ void MapPaintLayer::initMapLayerSettings()
ndbSymbolSize(24).ndbIdent().ndbInfo().
ilsIdent().ilsInfo().
airwayIdent().airwayInfo().airwayWaypoint().
userpoint().userpointInfo().userpoinSymbolSize(24).userpointMaxTextLength(30).
userpoint().userpointInfo().userpoinSymbolSize(28).userpointMaxTextLength(30).
markerSymbolSize(24).markerInfo().
airportMaxTextLength(30)).

Expand All @@ -255,7 +255,7 @@ void MapPaintLayer::initMapLayerSettings()
ndbSymbolSize(24).ndbIdent().ndbInfo().
ilsIdent().ilsInfo().
airwayIdent().airwayInfo().airwayWaypoint().
userpoint().userpointInfo().userpoinSymbolSize(24).userpointMaxTextLength(20).
userpoint().userpointInfo().userpoinSymbolSize(26).userpointMaxTextLength(20).
markerSymbolSize(24).markerInfo().
airportMaxTextLength(30)).

Expand All @@ -268,7 +268,7 @@ void MapPaintLayer::initMapLayerSettings()
ndbSymbolSize(22).ndbIdent().ndbInfo().
ilsIdent().ilsInfo().
airwayIdent().airwayWaypoint().
userpoint().userpointInfo().userpoinSymbolSize(24).userpointMaxTextLength(20).
userpoint().userpointInfo().userpoinSymbolSize(26).userpointMaxTextLength(20).
markerSymbolSize(24).
airportMaxTextLength(20)).

Expand Down
4 changes: 2 additions & 2 deletions src/options/optionsdialog.cpp
Expand Up @@ -174,8 +174,8 @@ OptionsDialog::OptionsDialog(QMainWindow *parentWindow)
QTreeWidgetItem *route = addTopItem(root, tr("Flight Plan"), tr("Select display options for the flight plan line."));
addItem<optsd::DisplayOptionsRoute>(route, displayOptItemIndexRoute, tr("Distance"), tr("Show distance along flight plan leg."), optsd::ROUTE_DISTANCE, true);
addItem<optsd::DisplayOptionsRoute>(route, displayOptItemIndexRoute, tr("Magnetic rhumb course"), tr("Show magnetic rhumb line course at flight plan leg.\nIndicated with \"R\" if rhumb and great circle are selected."), optsd::ROUTE_MAG_COURSE_RHUMB, true);
addItem<optsd::DisplayOptionsRoute>(route, displayOptItemIndexRoute, tr("True rhumb course"), tr("Show true rhumb line course at flight plan leg.\nIndicated with \"R\" if rhumb and great circle are selected."), optsd::ROUTE_TRUE_COURSE_RHUMB, false);
addItem<optsd::DisplayOptionsRoute>(route, displayOptItemIndexRoute, tr("Magnetic great circle course"), tr("Show magnetic great circle start course at flight plan leg.\nIndicated with \"GC\" if rhumb and great circle are selected."), optsd::ROUTE_MAG_COURSE_GC, false);
addItem<optsd::DisplayOptionsRoute>(route, displayOptItemIndexRoute, tr("True rhumb course"), tr("Show true rhumb line course at flight plan leg.\nIndicated with \"R\" if both rhumb and great circle are selected."), optsd::ROUTE_TRUE_COURSE_RHUMB, false);
addItem<optsd::DisplayOptionsRoute>(route, displayOptItemIndexRoute, tr("Magnetic great circle course"), tr("Show magnetic great circle start course at flight plan leg.\nIndicated with \"GC\" if both rhumb and great circle are selected."), optsd::ROUTE_MAG_COURSE_GC, false);
addItem<optsd::DisplayOptionsRoute>(route, displayOptItemIndexRoute, tr("True great circle course"), tr("Show true great circle start course at flight plan leg.\nIndicated with \"GC\" if rhumb and great circle are selected."), optsd::ROUTE_TRUE_COURSE_GC, false);

QTreeWidgetItem *userAircraft = addTopItem(root, tr("User Aircraft"), tr("Select text labels and other options for the user aircraft."));
Expand Down
3 changes: 2 additions & 1 deletion src/route/route.cpp
Expand Up @@ -2025,7 +2025,8 @@ void Route::getApproachRunwayEndAndIls(QVector<map::MapIls>& ils, map::MapRunway

bool Route::isTooFarToFlightPlan() const
{
return getDistanceToFlightPlan() > MAX_FLIGHT_PLAN_DIST_FOR_CENTER_NM;
return getDistanceToFlightPlan() < map::INVALID_DISTANCE_VALUE &&
getDistanceToFlightPlan() > MAX_FLIGHT_PLAN_DIST_FOR_CENTER_NM;
}

float Route::getDistanceToFlightPlan() const
Expand Down
6 changes: 4 additions & 2 deletions src/userdata/userdataicons.cpp
Expand Up @@ -58,7 +58,8 @@ void UserdataIcons::initTranslateableTexts()
{QLatin1Literal("DME"), tr("DME", "UserpointType")},
{QLatin1Literal("VORTAC"), tr("VORTAC", "UserpointType")},
{QLatin1Literal("TACAN"), tr("TACAN", "UserpointType")},
{QLatin1Literal("NDB"), tr("NDB", "UserpointType")}
{QLatin1Literal("NDB"), tr("NDB", "UserpointType")},
{QLatin1Literal("Lighthouse"), tr("Lighthouse", "UserpointType")}
});

translationToTypeMap = QHash<QString, QString>(
Expand Down Expand Up @@ -87,7 +88,8 @@ void UserdataIcons::initTranslateableTexts()
{tr("DME", "UserpointType"), QLatin1Literal("DME")},
{tr("VORTAC", "UserpointType"), QLatin1Literal("VORTAC")},
{tr("TACAN", "UserpointType"), QLatin1Literal("TACAN")},
{tr("NDB", "UserpointType"), QLatin1Literal("NDB")}
{tr("NDB", "UserpointType"), QLatin1Literal("NDB")},
{tr("Lighthouse", "UserpointType"), QLatin1Literal("Lighthouse")}
});
}

Expand Down

0 comments on commit 675d523

Please sign in to comment.