Skip to content

Commit 1f43dbe

Browse files
committed
Stats: Added a confirmation dialog for displaying over 50k QSOs on the map
1 parent 256c74c commit 1f43dbe

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

Changelog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ TBC - 0.39.0
88
- [CHANGED] - Awards - Bands are displayed based on the Settings (issue #452)
99
- [CHANGED] - WSJTX - More reliable detection of CQ stations (PR #471 @aa5sh)
1010
- [CHANGED] - WSJTX - SOTA/POTA/WWFF/SIG are being added to the logged QSO (PR #463 @aa5sh)
11+
- [CHANGED] - Stats - Add a confirmation dialog for displaying over 50k QSOs on the map
1112
- Fixed WSJT-X does not emit band change if rig is disconnected (issue #447)
1213
- Fixed Wrong import of ADIF file of another log program (issue #455)
1314
- Fixed WSJTX log record is stored incorrectly if it contains non-ASCII chars(issue #458)

ui/StatisticsWidget.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,12 +575,15 @@ void StatisticsWidget::drawPointsOnMap(QSqlQuery &query)
575575

576576
QList<QString> stations;
577577

578+
qulonglong count = 0;
579+
578580
while ( query.next() )
579581
{
580582
const Gridsquare stationGrid(query.value(1).toString());
581583

582584
if ( stationGrid.isValid() )
583585
{
586+
count++;
584587
double lat = stationGrid.getLatitude();
585588
double lon = stationGrid.getLongitude();
586589
stations.append(QString("[\"%1\", %2, %3, %4]").arg(query.value(0).toString())
@@ -590,6 +593,16 @@ void StatisticsWidget::drawPointsOnMap(QSqlQuery &query)
590593
}
591594
}
592595

596+
if ( count > 50000 )
597+
{
598+
QMessageBox::StandardButton reply;
599+
reply = QMessageBox::question(this, tr("Statistics"), tr("Over 50000 QSOs. Display them?"),
600+
QMessageBox::Yes|QMessageBox::No);
601+
602+
if ( reply != QMessageBox::Yes )
603+
stations.clear();
604+
}
605+
593606
QString javaScript = QString("grids_confirmed = [];"
594607
"grids_worked = [];"
595608
"drawPoints([%1]);"

0 commit comments

Comments
 (0)