X-Git-Url: https://ruin.nu/git/?p=hbs.git;a=blobdiff_plain;f=bs%2Fbsview.cpp;h=ec0e2135da6f5dec708c71b66009ad89b36ccf24;hp=1906dda16732358ee4452f3be5b00c6e0b99469f;hb=1d811feaee31f14d462eb46a04d805983a77d6e0;hpb=ea21b4f48454fef675d3d1990269e9d7f4c16e99 diff --git a/bs/bsview.cpp b/bs/bsview.cpp index 1906dda..ec0e213 100644 --- a/bs/bsview.cpp +++ b/bs/bsview.cpp @@ -105,11 +105,15 @@ void BSView::slotDocumentChanged() { QString g = (*j).first; QListViewItem* group = new QListViewItem(battle, g); + int groupShips = 0; for (map::iterator k = battles[b][g].begin(); k != battles[b][g].end(); k++) - { - (void) new QListViewItem(group, (*k).first); + { + int ships = battles[b][g][(*k).first].NumberOfShips(); + groupShips += ships; + (void) new QListViewItem(group, (*k).first, QString("%1").arg(ships)); } + group->setText(1, QString("%1").arg(groupShips)); } } }