fix crash when pressing Back to results

returning to the search when viewing a deck in the archidekt browser
while not viewing the first page, ie scroll down until it loads more,
caused a crash, using doSearch now resets the page entirely, this
however doesn't seem to be the best experience, however it never
actually saved the scroll bar location or anything so it's just how it
worked before but without the crash
This commit is contained in:
ebbit1q 2026-07-13 00:07:22 +02:00
parent 5bb6073422
commit 1822209489

View file

@ -639,7 +639,7 @@ void TabArchidekt::processDeckResponse(QJsonObject reply)
auto display = new ArchidektApiResponseDeckDisplayWidget(resultsContainer, deckData, cardSizeSlider);
connect(display, &ArchidektApiResponseDeckDisplayWidget::requestNavigation, this, &TabArchidekt::actNavigatePage);
connect(display, &ArchidektApiResponseDeckDisplayWidget::requestSearch, this, &TabArchidekt::doSearchImmediate);
connect(display, &ArchidektApiResponseDeckDisplayWidget::requestSearch, this, &TabArchidekt::doSearch);
connect(display, &ArchidektApiResponseDeckDisplayWidget::openInDeckEditor, tabSupervisor,
&TabSupervisor::openDeckInNewTab);
resultsLayout->addWidget(display);
@ -670,4 +670,4 @@ void TabArchidekt::prettyPrintJson(const QJsonValue &value, int indentLevel)
} else if (value.isNull()) {
qInfo().noquote() << indent + "null";
}
}
}