Skip to content

Commit

Permalink
it was not, in fact, a windows bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lumiscosity committed Dec 10, 2024
1 parent 17e8883 commit 105136f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pickerwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,21 @@ class PickerWidget : public QDialog {
template <class T> void dbdiff(std::vector<T> orig, std::vector<T> work, QString folder) {
if (orig.size() < work.size()) {
// note non-empty additions in new chunks
for (int i = orig.size(); i == work.size(); i++) {
for (int i = orig.size(); i <= work.size(); i++) {
if (work[i-1] != T()) {
addModelItem(folder, lcfops::id_with_name(i-1, ToQString(work[i-1].name)), "+", 1);
}
}
} else if (orig.size() > work.size()) {
// note non-empty removals in removed chunks
for (int i = work.size(); i == orig.size(); i++) {
for (int i = work.size(); i <= orig.size(); i++) {
if (orig[i-1] != T()) {
addModelItem(folder, lcfops::id_with_name(i-1, ToQString(orig[i-1].name)), "i", 1);
}
}
}
// note additions for slots shared between both databases
for (int i = 0, total = (work.size() < orig.size() ? orig.size() - 1 : work.size() - 1); i <= total; ++i) {
for (int i = 0, total = (work.size() < orig.size() ? work.size() - 1 : orig.size() - 1); i <= total; ++i) {
if (orig[i] != work[i]) {
QString comp = lcfops::compare<T>(orig[i], work[i]);
if (comp == "-") {
Expand Down

0 comments on commit 105136f

Please sign in to comment.