From 2b7b3c65cc61985ff94327002fa2578684a3f702 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Sun, 28 Mar 2021 15:38:30 +0800 Subject: [PATCH] Move cursor to the next line of end of text Closes #13908. --- src/gui/downloadfromurldialog.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gui/downloadfromurldialog.cpp b/src/gui/downloadfromurldialog.cpp index fdfad868c..1d85a385d 100644 --- a/src/gui/downloadfromurldialog.cpp +++ b/src/gui/downloadfromurldialog.cpp @@ -83,7 +83,12 @@ DownloadFromURLDialog::DownloadFromURLDialog(QWidget *parent) if (isDownloadable(str)) uniqueURLs << str; } - m_ui->textUrls->setText(uniqueURLs.values().join('\n')); + + const QString text = uniqueURLs.values().join(QLatin1Char('\n')) + + (!uniqueURLs.isEmpty() ? QLatin1String("\n") : QLatin1String("")); + + m_ui->textUrls->setText(text); + m_ui->textUrls->moveCursor(QTextCursor::End); Utils::Gui::resize(this, m_storeDialogSize); show();