Without this patch, when a file has to be loaded (for example,
after "Document->Settings->Local Class" or "Insert->Graphics")
and the file dialog is canceled, both Qt5 and Qt6 assert:
ASSERT failure in QList::at: "index out of range"
FileDialog::Result result;
FileDialog::Results results = openMulti(path, filters, suggested, false);
result.first = results.first;
- result.second = results.second.at(0);
+ if (result.first != FileDialog::Later)
+ result.second = results.second.at(0);
return result;
}