Showing the changes to interface/src/ui/AddressBarDialog.cpp (1 of 3 files). Show all
Unified · Split
| @@ -78,14 +78,16 @@ void AddressBarDialog::setupUI() { · 77 unmodified lines | ||
| 78 | 78 | |
| 79 | 79 | verticalLayout->addLayout(addressLayout); |
| 80 | 80 | |
| 81 | − connect(addressLineEdit, &QLineEdit::returnPressed, this, &AddressBarDialog::accept); | |
| 82 | 81 | connect(goButton, &QPushButton::clicked, this, &AddressBarDialog::accept); |
| 83 | 82 | connect(closeButton, &QPushButton::clicked, this, &QDialog::close); |
| 84 | 83 | } |
| 85 | 84 | |
| 86 | 85 | void AddressBarDialog::accept() { |
| 87 | − // let the AddressManger figure out what to do with this | |
| 88 | − if (AddressManager::getInstance().handleLookupString(addressLineEdit->text())) { | |
| 89 | − close(); | |
| 86 | + if (!addressLineEdit->text().isEmpty()) { | |
| 87 | + goButton->setStyleSheet("background: #333; color: #e7eeee; border-radius: 4px;"); | |
| 88 | + | |
| 89 | + AddressManager& addressManager = AddressManager::getInstance(); | |
| 90 | + connect(&addressManager, &AddressManager::lookupResultsFinished, this, &QDialog::close); | |
| 91 | + addressManager.handleLookupString(addressLineEdit->text()); | |
| 90 | 92 | } |
| 91 | 93 | } |