X-Git-Url: https://ruin.nu/git/?p=hbs.git;a=blobdiff_plain;f=bs%2Fbsview.cpp;fp=bs%2Fbsview.cpp;h=b5e25b0a2c88fe8d21c46ea1faa9af4c7973625d;hp=c6fcc46efe831d4f2975572ff26626a0589be94c;hb=935b6de2d1428854d76acc20b1727eb4a30f9273;hpb=cb2fabf93c2f6ba8b57833309038adb972f58925 diff --git a/bs/bsview.cpp b/bs/bsview.cpp index c6fcc46..b5e25b0 100644 --- a/bs/bsview.cpp +++ b/bs/bsview.cpp @@ -185,6 +185,7 @@ void BSView::slotDocumentChanged() } m_InfoView->setBattles(battlenames); updateInfoView(); + setCurrentListViewItem(); updateFleetView(); } @@ -196,9 +197,28 @@ void BSView::slotFleetSelection(QListViewItem *lvi) if (lvi->parent() == '\0') { m_FleetViews->raiseWidget(0); + m_sFleet = QString::null; + m_sGroup = QString::null; + QString temp = lvi->text(0); + + if (temp != m_sBattle) + { + m_sBattle = temp; + slotGenerateReport(); + } } else if (lvi->parent()->parent() == '\0') { + m_sFleet = QString::null; + m_sGroup = lvi->text(0); + QString temp = lvi->parent()->text(0); + + if (temp != m_sBattle) + { + m_sBattle = temp; + slotGenerateReport(); + } + if (lvi->text(0) == tr("Friendly")) { // m_FleetView->slotAttacker(false); @@ -477,6 +497,7 @@ void BSView::slotGenerateReport() const Planet* pl = dynamic_cast(fl); if (pl) { + cerr << "generating....." << endl; ReportList report = pl->report(); QString t; @@ -491,6 +512,7 @@ void BSView::slotGenerateReport() { t.append(QString("
  • Now handling initiative: %0\n").arg(j->first)); t.append("