Git: Enable renaming local branches by direct editing

Change-Id: I7edab94d949a6e48642f280af52fd156c803cafb
Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
Orgad Shaneh
2018-11-04 05:03:46 +02:00
committed by Orgad Shaneh
parent 1f1149bb58
commit a82dd10518
4 changed files with 37 additions and 1 deletions

View File

@@ -317,7 +317,10 @@ Qt::ItemFlags BranchModel::flags(const QModelIndex &index) const
BranchNode *node = indexToNode(index);
if (!node)
return Qt::NoItemFlags;
return Qt::ItemIsSelectable | Qt::ItemIsEnabled;
Qt::ItemFlags res = Qt::ItemIsSelectable | Qt::ItemIsEnabled;
if (node->isLeaf() && node->isLocal())
res |= Qt::ItemIsEditable;
return res;
}
void BranchModel::clear()