When drag & dropping onto the tag browser, set the current node to the one dropped upon.

This commit is contained in:
Charles Haley 2011-04-06 08:11:27 +01:00
parent b1f788a607
commit 97c5b041a3

View File

@ -985,6 +985,7 @@ class TagsModel(QAbstractItemModel): # {{{
def do_drop_from_library(self, md, action, row, column, parent): def do_drop_from_library(self, md, action, row, column, parent):
idx = parent idx = parent
if idx.isValid(): if idx.isValid():
self.tags_view.setCurrentIndex(idx)
node = self.data(idx, Qt.UserRole) node = self.data(idx, Qt.UserRole)
if node.type == TagTreeItem.TAG: if node.type == TagTreeItem.TAG:
fm = self.db.metadata_for_field(node.tag.category) fm = self.db.metadata_for_field(node.tag.category)