Do not store empty posttext for qualified citations

Fixes: #11308
(cherry picked from commit 90b1345203)
This commit is contained in:
Juergen Spitzmueller 2018-09-25 13:13:56 +02:00
parent 416b71883b
commit 76c15f51ea
2 changed files with 3 additions and 1 deletions

View File

@ -738,7 +738,7 @@ vector<docstring> GuiCitation::getPostTexts()
for (int i = 0; i != selected_model_.rowCount(); ++i) { for (int i = 0; i != selected_model_.rowCount(); ++i) {
QStandardItem const * key = selected_model_.item(i, 1); QStandardItem const * key = selected_model_.item(i, 1);
QStandardItem const * post = selected_model_.item(i, 2); QStandardItem const * post = selected_model_.item(i, 2);
if (key && post) if (key && post && !key->text().isEmpty() && !post->text().isEmpty())
res.push_back(qstring_to_ucs4(key->text()) + " " + qstring_to_ucs4(post->text())); res.push_back(qstring_to_ucs4(key->text()) + " " + qstring_to_ucs4(post->text()));
} }
return res; return res;

View File

@ -124,6 +124,8 @@ What's new
- Fix crash on Windows when closing external viewers (bug 11210). - Fix crash on Windows when closing external viewers (bug 11210).
- Fix issue with erroneous qualified citations (bug 11308).
* USER INTERFACE * USER INTERFACE