Fix for windows
This commit is contained in:
parent
0c8f49fd9c
commit
9e9a613996
@ -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) {
|
||||
return a.node.y1() < b.node.y1();
|
||||
});
|
||||
int groupIdx = 0;
|
||||
int prevY2 = -1;
|
||||
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];
|
||||
prevY2 = it.node.y2();
|
||||
}
|
||||
@ -524,7 +524,7 @@ void GetLastTransactionsScript::doStart() {
|
||||
const QDate searchLocalDate = m_searchTime.toTimeZone(tjTz).date();
|
||||
if (listDate.isValid() && searchLocalDate.isValid()) {
|
||||
const qint64 dayDiff = qAbs(listDate.daysTo(searchLocalDate));
|
||||
if (dayDiff > 1) {
|
||||
if (dayDiff > 3) {
|
||||
qDebug() << "[Dushanbe::GetLastTransactions] Date pre-filter skip:"
|
||||
<< tx.date << "vs" << searchLocalDate.toString("dd.MM.yyyy")
|
||||
<< "diff=" << dayDiff << "days";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user