Fix for windows
This commit is contained in:
parent
c2fc0104c6
commit
0ab71db506
@ -489,14 +489,14 @@ void GetLastTransactionsScript::doStart() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3. Сортируем по Y и группируем по разрывам (> 50px → новая группа-день)
|
// 3. Сортируем по Y и группируем по разрывам (> 30px → новая группа-день)
|
||||||
std::sort(items.begin(), items.end(), [](const VypiskaItem &a, const VypiskaItem &b) {
|
std::sort(items.begin(), items.end(), [](const VypiskaItem &a, const VypiskaItem &b) {
|
||||||
return a.node.y1() < b.node.y1();
|
return a.node.y1() < b.node.y1();
|
||||||
});
|
});
|
||||||
int groupIdx = 0;
|
int groupIdx = 0;
|
||||||
int prevY2 = -1;
|
int prevY2 = -1;
|
||||||
for (VypiskaItem &it : items) {
|
for (VypiskaItem &it : items) {
|
||||||
if (prevY2 >= 0 && it.node.y1() - prevY2 > 50) ++groupIdx;
|
if (prevY2 >= 0 && it.node.y1() - prevY2 > 30) ++groupIdx;
|
||||||
if (groupIdx < groupDates.size()) it.date = groupDates[groupIdx];
|
if (groupIdx < groupDates.size()) it.date = groupDates[groupIdx];
|
||||||
prevY2 = it.node.y2();
|
prevY2 = it.node.y2();
|
||||||
}
|
}
|
||||||
@ -524,7 +524,7 @@ void GetLastTransactionsScript::doStart() {
|
|||||||
const QDate searchLocalDate = m_searchTime.toTimeZone(tjTz).date();
|
const QDate searchLocalDate = m_searchTime.toTimeZone(tjTz).date();
|
||||||
if (listDate.isValid() && searchLocalDate.isValid()) {
|
if (listDate.isValid() && searchLocalDate.isValid()) {
|
||||||
const qint64 dayDiff = qAbs(listDate.daysTo(searchLocalDate));
|
const qint64 dayDiff = qAbs(listDate.daysTo(searchLocalDate));
|
||||||
if (dayDiff > 1) {
|
if (dayDiff > 3) {
|
||||||
qDebug() << "[Dushanbe::GetLastTransactions] Date pre-filter skip:"
|
qDebug() << "[Dushanbe::GetLastTransactions] Date pre-filter skip:"
|
||||||
<< tx.date << "vs" << searchLocalDate.toString("dd.MM.yyyy")
|
<< tx.date << "vs" << searchLocalDate.toString("dd.MM.yyyy")
|
||||||
<< "diff=" << dayDiff << "days";
|
<< "diff=" << dayDiff << "days";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user