Prevent error dialog reentry
This commit is contained in:
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
AddressCombo::AddressCombo(QWidget* parent) :
|
AddressCombo::AddressCombo(QWidget* parent) :
|
||||||
QComboBox(parent) {
|
QComboBox(parent) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString AddressCombo::itemText(int i) {
|
QString AddressCombo::itemText(int i) {
|
||||||
|
|||||||
@@ -657,8 +657,15 @@ void Connection::doRPCIgnoreError(const json& payload, const std::function<void(
|
|||||||
void Connection::showTxError(const QString& error) {
|
void Connection::showTxError(const QString& error) {
|
||||||
if (error.isNull()) return;
|
if (error.isNull()) return;
|
||||||
|
|
||||||
|
// Prevent multiple dialog boxes from showing, because they're all called async
|
||||||
|
static bool shown = false;
|
||||||
|
if (shown)
|
||||||
|
return;
|
||||||
|
|
||||||
|
shown = true;
|
||||||
QMessageBox::critical(main, "Transaction Error", "There was an error sending the transaction. The error was: \n\n"
|
QMessageBox::critical(main, "Transaction Error", "There was an error sending the transaction. The error was: \n\n"
|
||||||
+ error, QMessageBox::StandardButton::Ok);
|
+ error, QMessageBox::StandardButton::Ok);
|
||||||
|
shown = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user