Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ui/mainwindow_presenter.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,7 @@ def __updateGalacticPlot(self):
if not self.__showAutoConnections:
autoConnectionDistance = 0
self.__plot.plotGalaxy(
self.getSelectedCampaign().setName,
self.__checkedPlanets,
self.__checkedTradeRoutes,
self.__planets,
Expand Down
4 changes: 3 additions & 1 deletion ui/qtgalacticplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(self, parent: QWidget = None):
self.__planetsScatter = None
self.__tradeRouteTraceStart = None

def plotGalaxy(self, planets, tradeRoutes, allPlanets, planetOwners = [], autoPlanetConnectionDistance: int = 0) -> None:
def plotGalaxy(self, campaignSetName, planets, tradeRoutes, allPlanets, planetOwners = [], autoPlanetConnectionDistance: int = 0) -> None:
'''Plots all planets as alpha = 0.1, then overlays all selected planets and trade routes'''
if self.__is_first_run:
x = [p.x for p in allPlanets]
Expand All @@ -48,6 +48,8 @@ def plotGalaxy(self, planets, tradeRoutes, allPlanets, planetOwners = [], autoPl

self.__is_first_run = False

self.__galacticPlotCanvas.get_default_filename = lambda: campaignSetName + '.png'

xlim = self.__axes.get_xlim()
ylim = self.__axes.get_ylim()
self.__axes.autoscale(False)
Expand Down