use multiline input dialog for annotations (#4517)

This commit is contained in:
ebbit1q 2022-01-08 22:02:25 +01:00 committed by GitHub
parent 1347d88ddb
commit 59d4e64a8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3034,7 +3034,7 @@ void Player::actSetPT()
} }
bool ok; bool ok;
dialogSemaphore = true; dialogSemaphore = true;
QString pt = QInputDialog::getText(nullptr, tr("Change power/toughness"), tr("Change stats to:"), QLineEdit::Normal, QString pt = QInputDialog::getText(game, tr("Change power/toughness"), tr("Change stats to:"), QLineEdit::Normal,
oldPT, &ok); oldPT, &ok);
dialogSemaphore = false; dialogSemaphore = false;
if (clearCardsToDelete() || !ok) { if (clearCardsToDelete() || !ok) {
@ -3140,8 +3140,8 @@ void Player::actSetAnnotation()
bool ok; bool ok;
dialogSemaphore = true; dialogSemaphore = true;
QString annotation = QInputDialog::getText(nullptr, tr("Set annotation"), tr("Please enter the new annotation:"), QString annotation = QInputDialog::getMultiLineText(game, tr("Set annotation"),
QLineEdit::Normal, oldAnnotation, &ok); tr("Please enter the new annotation:"), oldAnnotation, &ok);
dialogSemaphore = false; dialogSemaphore = false;
if (clearCardsToDelete() || !ok) { if (clearCardsToDelete() || !ok) {
return; return;