diff options
author | Andre Hartmann <[email protected]> | 2024-02-05 17:31:57 +0100 |
---|---|---|
committer | André Hartmann <[email protected]> | 2024-02-05 17:27:14 +0000 |
commit | 97e582c3c0edbf9e646b9df667823bead5dd5e46 (patch) | |
tree | e23c9b55b21c072cbc0ca92926a8287b6cb86fb3 /src | |
parent | fb609817bfe3c1f89bfca4a493e932a0697a6cd7 (diff) |
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 <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/git/branchview.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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<QString> remote = m_model->remoteName(index); if (remote.has_value()) { contextMenu.addAction(Tr::tr("&Fetch"), this, [this, &remote] { |