From 49aefb0283d93462600b08fabeee3f8adb988a0b Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Fri, 25 Oct 2013 02:57:01 -0700 Subject: [PATCH] commitmsg: disable the "amend" action when merging Make the amend action sensiive to in-progress merges. The action is now disabled to prevent users from seeing the "do not amend while merging" message. Signed-off-by: David Aguilar --- cola/widgets/commitmsg.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cola/widgets/commitmsg.py b/cola/widgets/commitmsg.py index 8466163a..eafcd9d3 100644 --- a/cola/widgets/commitmsg.py +++ b/cola/widgets/commitmsg.py @@ -329,8 +329,10 @@ class CommitMessageEditor(QtGui.QWidget): self.description.setFont(font) def set_mode(self, mode): + can_amend = not self.model.is_merging checked = (mode == self.model.mode_amend) blocksignals = self.amend_action.blockSignals(True) + self.amend_action.setEnabled(can_amend) self.amend_action.setChecked(checked) self.amend_action.blockSignals(blocksignals) -- 2.11.4.GIT