Fix story viewer after attach choose dialog.

This commit is contained in:
John Preston 2023-07-20 20:20:32 +04:00
parent 75f542747d
commit 150957abcd
1 changed files with 3 additions and 1 deletions

View File

@ -371,6 +371,9 @@ bool GetDefault(
? parent->window()
: Core::App().getFileDialogParent();
Core::App().notifyFileDialogShown(true);
const auto guard = gsl::finally([] {
Core::App().notifyFileDialogShown(false);
});
if (type == Type::ReadFiles) {
files = QFileDialog::getOpenFileNames(resolvedParent, caption, startFile, filter);
QString path = files.isEmpty() ? QString() : QFileInfo(files.back()).absoluteDir().absolutePath();
@ -386,7 +389,6 @@ bool GetDefault(
} else {
file = QFileDialog::getOpenFileName(resolvedParent, caption, startFile, filter);
}
Core::App().notifyFileDialogShown(false);
if (file.isEmpty()) {
files = QStringList();