From 21025cd86eafffce53d025c1bcccee8e203d7a26 Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Sun, 22 Jul 2018 23:51:35 -0700 Subject: [PATCH] commitmsg: use context.selection Signed-off-by: David Aguilar --- cola/widgets/commitmsg.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cola/widgets/commitmsg.py b/cola/widgets/commitmsg.py index d03740f5..afe71729 100644 --- a/cola/widgets/commitmsg.py +++ b/cola/widgets/commitmsg.py @@ -21,7 +21,6 @@ from ..gitcmds import commit_message_path from ..i18n import N_ from ..models import dag from ..models import prefs -from ..models import selection from ..qtutils import get from ..utils import Group from . import defs @@ -182,9 +181,9 @@ class CommitMessageEditor(QtWidgets.QWidget): qtutils.add_action(self.summary, N_('Move Down'), self.summary_cursor_down, hotkeys.DOWN) - self.selection_model = selection_model = selection.selection_model() - selection_model.add_observer(selection_model.message_selection_changed, - self.updated.emit) + self.selection = selection = context.selection + selection.add_observer( + selection.message_selection_changed, self.updated.emit) self.model.add_observer(self.model.message_commit_message_changed, self.commit_message_changed.emit) -- 2.11.4.GIT