1
0
forked from 0ad/0ad

Fix upgrades not being sorted by phase in structuretree

Currenlty there is regression in structuretree from b2842e8021, when
upgrade for sentry tower is not in the correct phase row.
Thix is fixing that.
Probably typo in condition.

Differential Revision: D3252
Reviewed by: bb
This was SVN commit r24461.
This commit is contained in:
Angen 2020-12-27 15:47:30 +00:00
parent 06dfd3eaa0
commit 1432343eeb

View File

@ -54,7 +54,7 @@ class ProductionRowManager
for (let upgrade of template.upgrades)
{
let pIdx = 0;
if (this.phaseSort)
if (this.sortProductionsByPhase)
pIdx = this.page.TemplateParser.phaseList.indexOf(upgrade.phase);
let rowIdx = Math.max(0, pIdx - phaseIdx);
this.productionRows[rowIdx].drawIcon(upgrade, civCode);