From 477a4889b3e82c522bfec63d46be2a2c6214026c Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Mon, 24 Jun 2019 06:52:46 +0300 Subject: [PATCH] Resolved #893 - trade table doesn't reset after trade --- core/src/com/unciv/ui/trade/TradeTable.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/src/com/unciv/ui/trade/TradeTable.kt b/core/src/com/unciv/ui/trade/TradeTable.kt index 82ea2c33d4..70efed0bd2 100644 --- a/core/src/com/unciv/ui/trade/TradeTable.kt +++ b/core/src/com/unciv/ui/trade/TradeTable.kt @@ -57,7 +57,7 @@ class TradeTable(val otherCivilization: CivilizationInfo, stage: Stage, onTradeC } else if(offerButton.text.toString() == "Accept".tr()){ tradeLogic.acceptTrade() - offerColumnsTable = OfferColumnsTable(tradeLogic, stage) { onChange() } + offerColumnsTable = OfferColumnsTable(TradeLogic(currentPlayerCiv,otherCivilization), stage) { onChange() } offerColumnsTableWrapper.clear() offerColumnsTableWrapper.add(offerColumnsTable) if(tradeLogic.currentTrade.ourOffers.any { it.name== Constants.peaceTreaty }) @@ -65,7 +65,6 @@ class TradeTable(val otherCivilization: CivilizationInfo, stage: Stage, onTradeC else tradeText.setText("Pleasure doing business with you!".tr()) onTradeComplete() - tradeLogic = TradeLogic(currentPlayerCiv,otherCivilization) offerButton.setText("Offer trade".tr()) } }