Ticket #3288: selection_panels.js.patch

File selection_panels.js.patch, 931 bytes (added by usey11, 8 years ago)
  • binaries/data/mods/public/gui/session/selection_panels.js

     
    780780        // TODO 8 is the row lenght, make variable
    781781        if (getNumberOfRightPanelButtons() > 8 && selection.length > 1)
    782782            return [];
     783
     784        var techs = [];
    783785        for (var ent of selection)
    784786        {
    785787            var entState = GetEntityState(ent);
    786             if (entState.production && entState.production.technologies.length)
    787                 return entState.production.technologies;
     788            if (entState.production && entState.production.technologies.length) {
     789                for(var tech of entState.production.technologies)
     790                    techs.push(tech);
     791            }
    788792        }
    789         return [];
     793        return techs;
    790794    },
    791795    "hideItem": function(i, rowLength) // called when no item is found
    792796    {