Commit 9485826c authored by Cristian Oneț's avatar Cristian Oneț
Browse files

Allow editing the memo of multiple transactions.

The memo can't be cleared (the text can't be empty) but it can be changed.

BUG: 289351
parent ae1253ac
......@@ -764,6 +764,7 @@ void StdTransactionEditor::createEditWidgets(void)
KTextEdit* memo = new KTextEdit;
memo->setObjectName(QLatin1String("Memo"));
memo->setTabChangesFocus(true);
connect(memo, SIGNAL(textChanged()), this, SLOT(slotUpdateButtonState()));
m_editWidgets["memo"] = memo;
bool showNumberField = true;
......@@ -1770,6 +1771,7 @@ bool StdTransactionEditor::isComplete(QString& reason) const
kMyMoneyEdit* amount = dynamic_cast<kMyMoneyEdit*>(*it_w);
KMyMoneyReconcileCombo* reconcile = dynamic_cast<KMyMoneyReconcileCombo*>(*it_w);
KMyMoneyCashFlowCombo* cashflow = dynamic_cast<KMyMoneyCashFlowCombo*>(*it_w);
KTextEdit* memo = dynamic_cast<KTextEdit*>(*it_w);
if (payee && !(payee->currentText().isEmpty()))
break;
......@@ -1790,6 +1792,9 @@ bool StdTransactionEditor::isComplete(QString& reason) const
if (postDate->date().isValid() && (postDate->date() >= m_account.openingDate()))
break;
if (memo && !memo->toPlainText().isEmpty())
break;
}
}
return it_w != m_editWidgets.end();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment