Show recent images when it gains content

This commit is contained in:
Sune Vuorela 2023-06-13 08:47:23 +02:00 committed by Nate Graham
parent 3c6ebac826
commit 91b03f860a

View file

@ -274,6 +274,10 @@ std::optional<SigningInformation> getCertificateAndPasswordForSigning(PageView *
if (!haveRecent) {
dialog.ui->recentBackgrounds->hide();
dialog.ui->recentLabel->hide();
QObject::connect(&imagesModel, &QAbstractItemModel::rowsInserted, &dialog, [&dialog]() {
dialog.ui->recentBackgrounds->show();
dialog.ui->recentLabel->show();
});
}
QObject::connect(dialog.ui->backgroundInput, &QLineEdit::textChanged, &dialog, [recentModel = &imagesModel, selectionModel = dialog.ui->recentBackgrounds->selectionModel()](const QString &newText) {