Correct names of ports in Port Stats Window. The problem is seen only with 2 (or more) portgroups where the number of ports in the subsequent portgroup is more than the number of ports in the previous portgroup

Fixes issue 88
This commit is contained in:
John Paul Spiro-Colwell 2014-12-27 12:16:42 +05:30
parent 42f716e693
commit 1bc4efe48b

View File

@ -77,7 +77,7 @@ void PortStatsModel::getDomainIndexes(const QModelIndex &index,
if (portGroupIdx) if (portGroupIdx)
{ {
if (numPorts.at(portGroupIdx -1)) if (numPorts.at(portGroupIdx -1))
portIdx = (portNum - 1) % numPorts.at(portGroupIdx - 1); portIdx = (portNum - 1) - numPorts.at(portGroupIdx - 1);
else else
portIdx = portNum - 1; portIdx = portNum - 1;
} }