From 28edc9e0588e9dbd6c4abb19be1e6450e74a61a0 Mon Sep 17 00:00:00 2001 From: Adrien Tétar Date: Wed, 21 Oct 2015 12:43:55 +0200 Subject: glyphCollectionView: make highlight/insert mechanism subclass-aware --- Lib/defconQt/groupsView.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Lib/defconQt/groupsView.py') diff --git a/Lib/defconQt/groupsView.py b/Lib/defconQt/groupsView.py index d52a0c5..3a4f959 100644 --- a/Lib/defconQt/groupsView.py +++ b/Lib/defconQt/groupsView.py @@ -131,6 +131,7 @@ class GroupCollectionWidget(GlyphCollectionWidget): super(GroupCollectionWidget, self).pipeDropEvent(event) elif self.characterDropCallback is not None: self.characterDropCallback(event) + self.currentDropIndex = None class GroupsWindow(QWidget): @@ -275,7 +276,9 @@ class GroupsWindow(QWidget): # Due to defcon limitations, we must fetch and update for the # notification to pass through currentGroupList = self.font.groups[currentGroup] - currentGroupList.append(gName) + # TODO: decouple better + index = self.collectionWidget.currentDropIndex + currentGroupList.insert(index, gName) self.font.groups[currentGroup] = currentGroupList event.acceptProposedAction() self._groupChanged() -- cgit v1.2.3