From 97e582c3c0edbf9e646b9df667823bead5dd5e46 Mon Sep 17 00:00:00 2001 From: Andre Hartmann Date: Mon, 5 Feb 2024 17:31:57 +0100 Subject: [PATCH] Git: BranchView: No "Add..." action for remote branches It has been wrong forever, but it just doesn't make sense to have an add action for remote branches. Change-Id: Ia9a96d85f95821f27215e0a172435f38abcd685f Reviewed-by: Orgad Shaneh --- src/plugins/git/branchview.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/git/branchview.cpp b/src/plugins/git/branchview.cpp index 01ff5ce8ac4..c99789a100a 100644 --- a/src/plugins/git/branchview.cpp +++ b/src/plugins/git/branchview.cpp @@ -236,7 +236,9 @@ void BranchView::slotCustomContextMenu(const QPoint &point) SetInContext block(m_blockRefresh); QMenu contextMenu; - contextMenu.addAction(Tr::tr("&Add..."), this, &BranchView::add); + if (isLocal) + contextMenu.addAction(Tr::tr("&Add..."), this, &BranchView::add); + const std::optional remote = m_model->remoteName(index); if (remote.has_value()) { contextMenu.addAction(Tr::tr("&Fetch"), this, [this, &remote] {