aboutsummaryrefslogtreecommitdiff
path: root/src/qt/transactionview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/transactionview.cpp')
-rw-r--r--src/qt/transactionview.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp
index aa5c82ddb1..351305f3fa 100644
--- a/src/qt/transactionview.cpp
+++ b/src/qt/transactionview.cpp
@@ -531,6 +531,7 @@ void TransactionView::showDetails()
{
TransactionDescDialog *dlg = new TransactionDescDialog(selection.at(0));
dlg->setAttribute(Qt::WA_DeleteOnClose);
+ m_opened_dialogs.append(dlg);
dlg->show();
}
}
@@ -637,6 +638,11 @@ bool TransactionView::eventFilter(QObject *obj, QEvent *event)
return true;
}
}
+ if (event->type() == QEvent::EnabledChange) {
+ if (!isEnabled()) {
+ closeOpenedDialogs();
+ }
+ }
return QWidget::eventFilter(obj, event);
}
@@ -646,3 +652,12 @@ void TransactionView::updateWatchOnlyColumn(bool fHaveWatchOnly)
watchOnlyWidget->setVisible(fHaveWatchOnly);
transactionView->setColumnHidden(TransactionTableModel::Watchonly, !fHaveWatchOnly);
}
+
+void TransactionView::closeOpenedDialogs()
+{
+ // close all dialogs opened from this view
+ for (QDialog* dlg : m_opened_dialogs) {
+ dlg->close();
+ }
+ m_opened_dialogs.clear();
+}