Resolved #893 - trade table doesn't reset after trade

This commit is contained in:
Yair Morgenstern 2019-06-24 06:52:46 +03:00
parent 3b9ab43bbe
commit 477a4889b3

View File

@ -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())
}
}