diff --git a/ui/mainwindow_presenter.py b/ui/mainwindow_presenter.py index 62cfbef..d2964f4 100644 --- a/ui/mainwindow_presenter.py +++ b/ui/mainwindow_presenter.py @@ -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, diff --git a/ui/qtgalacticplot.py b/ui/qtgalacticplot.py index 878ecdb..12ac903 100644 --- a/ui/qtgalacticplot.py +++ b/ui/qtgalacticplot.py @@ -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] @@ -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)