From efc0d34abdaeabdc84bb6e17336a3c903682ea42 Mon Sep 17 00:00:00 2001 From: Andre Hartmann Date: Sun, 24 Nov 2024 12:39:15 +0100 Subject: [PATCH] Git: Improve: "No Add action for remote branches" The original commit 97e582c3 wanted to remove the "Add..." context menu from "Remote Branches" and the remotes itself (like "origin" or "gerrit"). But the actual result was, that "Add..." was removed from all remote branches and that removed the action to create new local branches from a specific remote branch. Amends 97e582c3c0edbf9e646b9df667823bead5dd5e46. Change-Id: I79948eef36e6fb3ca1d6ecdb53eb256e6b50c8b7 Reviewed-by: Orgad Shaneh --- src/plugins/git/branchview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/git/branchview.cpp b/src/plugins/git/branchview.cpp index 555db9b01be..c8ff252f154 100644 --- a/src/plugins/git/branchview.cpp +++ b/src/plugins/git/branchview.cpp @@ -236,7 +236,7 @@ void BranchView::slotCustomContextMenu(const QPoint &point) SetInContext block(m_blockRefresh); QMenu contextMenu; - if (isLocal) + if (isLocal || hasActions) contextMenu.addAction(Tr::tr("&Add..."), this, &BranchView::add); const std::optional remote = m_model->remoteName(index);