Skip to content

Commit

Permalink
Subdivisions are not repeated in combobox
Browse files Browse the repository at this point in the history
  • Loading branch information
ea4k committed Aug 15, 2024
1 parent 2e543f0 commit c3d55a0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/database/db_adif_primary_subdvisions_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ bool DB_ADIF_Primary_Subdvisions_data::add_Canada_1()
<< "'1', 'New Brunswick', 'NB', 'VE9', '05', '09', '', '-1', '', '', 'N'"
<< "'1', 'New foundland', 'NL', 'VO1', '02', '09', '', '-1', '', '', 'N'"
<< "'1', 'New foundland', 'NL', 'VO1', '05', '09', '', '-1', '', '', 'N'"
<< "'1', 'Yukon', 'YT', 'vy1', '01', '02', '', '-1', '', '', 'N'"
<< "'1', 'Yukon', 'YT', 'VY1', '01', '02', '', '-1', '', '', 'N'"
<< "'1', 'Prince Edward island', 'PE', 'VY2', '05', '09', '', '-1', '', '', 'N'"
<< "'1', 'Nunavut', 'NU', 'VY0', '02', '04', '', '-1', '', '', 'N'"
<< "'1', 'Nunavut', 'NU', 'VY0', '02', '09', '', '-1', '', '', 'N'"
Expand Down
8 changes: 7 additions & 1 deletion src/inputwidgets/mainwindowinputothers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -744,10 +744,16 @@ void MainWindowInputOthers::updatePrimarySubdivisionsComboBox(QList<PrimarySubdi

QStringList listOfSubdivisions;
listOfSubdivisions.clear();
QStringList names;
names.clear();


foreach (PrimarySubdivision ps, _subdivisions)
{

QString subdivision = ps.shortName + "-" + ps.name;
listOfSubdivisions.append(subdivision);
if (!listOfSubdivisions.contains(subdivision))
listOfSubdivisions.append(subdivision);
//qDebug() << Q_FUNC_INFO << ": Subdivision added: " << subdivision;
}
if (listOfSubdivisions.count()<1)
Expand Down

0 comments on commit c3d55a0

Please sign in to comment.