#93 - Allow memo field to be selectable + copied
This commit is contained in:
parent
97461c373b
commit
d34e38cd73
|
@ -1026,12 +1026,15 @@ void MainWindow::setupTransactionsTab() {
|
|||
QString memo = txModel->getMemo(index.row());
|
||||
|
||||
if (!memo.isEmpty()) {
|
||||
QMessageBox::information(this, tr("Memo"), memo, QMessageBox::Ok);
|
||||
QMessageBox mb(QMessageBox::Information, tr("Memo"), memo, QMessageBox::Ok, this);
|
||||
mb.setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard);
|
||||
mb.exec();
|
||||
}
|
||||
});
|
||||
|
||||
// Set up context menu on transactions tab
|
||||
ui->transactionsTable->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
|
||||
// Table right click
|
||||
QObject::connect(ui->transactionsTable, &QTableView::customContextMenuRequested, [=] (QPoint pos) {
|
||||
QModelIndex index = ui->transactionsTable->indexAt(pos);
|
||||
|
@ -1069,7 +1072,9 @@ void MainWindow::setupTransactionsTab() {
|
|||
|
||||
if (!memo.isEmpty()) {
|
||||
menu.addAction(tr("View Memo"), [=] () {
|
||||
QMessageBox::information(this, tr("Memo"), memo, QMessageBox::Ok);
|
||||
QMessageBox mb(QMessageBox::Information, tr("Memo"), memo, QMessageBox::Ok, this);
|
||||
mb.setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard);
|
||||
mb.exec();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue