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 97e582c3c0.

Change-Id: I79948eef36e6fb3ca1d6ecdb53eb256e6b50c8b7
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Andre Hartmann
2024-11-24 12:39:15 +01:00
committed by André Hartmann
parent 12b85599ec
commit efc0d34abd

View File

@@ -236,7 +236,7 @@ void BranchView::slotCustomContextMenu(const QPoint &point)
SetInContext block(m_blockRefresh); SetInContext block(m_blockRefresh);
QMenu contextMenu; QMenu contextMenu;
if (isLocal) if (isLocal || hasActions)
contextMenu.addAction(Tr::tr("&Add..."), this, &BranchView::add); contextMenu.addAction(Tr::tr("&Add..."), this, &BranchView::add);
const std::optional<QString> remote = m_model->remoteName(index); const std::optional<QString> remote = m_model->remoteName(index);