diff options
author | Luboš Doležel <lubos@dolezel.info> | 2016-10-05 20:16:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-05 20:16:08 +0200 |
commit | afd7d266917444e988ecc71486f2e6530db9e682 (patch) | |
tree | 9f60b694833c3945e774ae9bdd0055d6b1682e94 | |
parent | dff38f356445ca6199589a0e122001bae5dc0982 (diff) | |
parent | 52c818202c3ad252ef29a7f2706ad374e03be3d2 (diff) | |
download | twinkle-afd7d266917444e988ecc71486f2e6530db9e682.tar twinkle-afd7d266917444e988ecc71486f2e6530db9e682.tar.gz twinkle-afd7d266917444e988ecc71486f2e6530db9e682.tar.lz twinkle-afd7d266917444e988ecc71486f2e6530db9e682.tar.xz twinkle-afd7d266917444e988ecc71486f2e6530db9e682.zip |
Merge pull request #80 from fbriere/bug/number-conversion-multiple
Fix two issues with multiple number conversion rules in UserProfileForm
-rw-r--r-- | src/gui/userprofileform.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/userprofileform.cpp b/src/gui/userprofileform.cpp index 9a33ea2..f20a0d9 100644 --- a/src/gui/userprofileform.cpp +++ b/src/gui/userprofileform.cpp @@ -595,7 +595,7 @@ void UserProfileForm::populate() conversionListView->setRowCount(conversions.size()); int j = 0; - for (list<t_number_conversion>::reverse_iterator i = conversions.rbegin(); i != conversions.rend(); i++, j++) + for (list<t_number_conversion>::iterator i = conversions.begin(); i != conversions.end(); i++, j++) { QTableWidgetItem* item = new QTableWidgetItem(QString::fromStdString(i->re)); conversionListView->setItem(j, 0, item); @@ -706,9 +706,9 @@ list<t_number_conversion> UserProfileForm::get_number_conversions() t_number_conversion c; try { - item = conversionListView->item(0, 0); + item = conversionListView->item(i, 0); c.re.assign(item->text().toStdString()); - item = conversionListView->item(0, 1); + item = conversionListView->item(i, 1); c.fmt = item->text().toStdString(); conversions.push_back(c); } catch (std::regex_error) { |