diff --git a/src/Core/GuiDisplayGen.m b/src/Core/GuiDisplayGen.m index 306e307cc..bd7287424 100644 --- a/src/Core/GuiDisplayGen.m +++ b/src/Core/GuiDisplayGen.m @@ -1782,7 +1782,6 @@ - (void) drawStarChart:(GLfloat)x :(GLfloat)y :(GLfloat)z :(GLfloat) alpha :(BOO (textRow-1) * MAIN_GUI_ROW_HEIGHT * pixelRatio); OOSystemID target = [PLAYER targetSystemID]; - NSString *targetName = [UNIVERSE getSystemName:target]; double dx, dy; // get a list of systems marked as contract destinations @@ -1893,10 +1892,9 @@ - (void) drawStarChart:(GLfloat)x :(GLfloat)y :(GLfloat)z :(GLfloat) alpha :(BOO { [self drawAdvancedNavArrayAtX:x+hoffset y:y+voffset z:z alpha:alpha usingRoute:nil optimizedBy:OPTIMIZED_BY_NONE zoom: zoom]; } - NSPoint targetCoordinates = (NSPoint){0,0}; if (!routeExists) { - targetCoordinates = [systemManager getCoordinatesForSystem:target inGalaxy:galaxy_id]; + NSPoint targetCoordinates = [systemManager getCoordinatesForSystem:target inGalaxy:galaxy_id]; distance = distanceBetweenPlanetPositions(targetCoordinates.x,targetCoordinates.y,galaxy_coordinates.x,galaxy_coordinates.y); if (distance == 0.0) @@ -2234,7 +2232,7 @@ - (void) drawStarChart:(GLfloat)x :(GLfloat)y :(GLfloat)z :(GLfloat) alpha :(BOO tab_stops[2] = 288; [self overrideTabs:tab_stops from:kGuiChartTraveltimeTabs length:3]; [self setTabStops:tab_stops]; - targetName = [[UNIVERSE getSystemName:target] retain]; + NSString *targetName = [[UNIVERSE getSystemName:target] retain]; // distance-f & est-travel-time-f are identical between short & long range charts in standard Oolite, however can be alterered separately via OXPs NSString *travelDistLine = @"";