aboutsummaryrefslogtreecommitdiff
path: root/src/qt/transactionview.cpp
diff options
context:
space:
mode:
authorJarol Rodriguez <jarolrod@tutanota.com>2021-09-24 02:55:00 -0400
committerJarol Rodriguez <jarolrod@tutanota.com>2021-09-24 02:55:00 -0400
commit8177578b296adb82fb8ab6c64cd76b832ebcc132 (patch)
treecb85f089ffee42846e79e647ee1715afcb84ef68 /src/qt/transactionview.cpp
parenta70a98075a0d258d41c1310553a2337538a1d80c (diff)
downloadbitcoin-8177578b296adb82fb8ab6c64cd76b832ebcc132.tar.xz
qt: ensure seperator when adding third-party transaction links
This ensures that if we're going to add an action to open up a transaction in a third-party link (block explorer) that it is seperated into it's own section.
Diffstat (limited to 'src/qt/transactionview.cpp')
-rw-r--r--src/qt/transactionview.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp
index d9e770e2d4..1973c9de9a 100644
--- a/src/qt/transactionview.cpp
+++ b/src/qt/transactionview.cpp
@@ -222,14 +222,17 @@ void TransactionView::setModel(WalletModel *_model)
{
// Add third party transaction URLs to context menu
QStringList listUrls = GUIUtil::SplitSkipEmptyParts(_model->getOptionsModel()->getThirdPartyTxUrls(), "|");
+ bool actions_created = false;
for (int i = 0; i < listUrls.size(); ++i)
{
QString url = listUrls[i].trimmed();
QString host = QUrl(url, QUrl::StrictMode).host();
if (!host.isEmpty())
{
- if (i == 0)
+ if (!actions_created) {
contextMenu->addSeparator();
+ actions_created = true;
+ }
/*: Transactions table context menu action to show the
selected transaction in a third-party block explorer.
%1 is a stand-in argument for the URL of the explorer. */