Tag Browser: Fix drag and drop of books onto a language not setting the language. Fixes #1373504 [Cannot set language by drag-and-drop](https://bugs.launchpad.net/calibre/+bug/1373504)

This commit is contained in:
Kovid Goyal 2014-09-27 17:49:53 +05:30
parent 2b415d4ded
commit 8da132f9e4

View File

@ -733,7 +733,7 @@ class TagsModel(QAbstractItemModel): # {{{
if node.type == TagTreeItem.TAG:
fm = self.db.metadata_for_field(node.tag.category)
if node.tag.category in \
('tags', 'series', 'authors', 'rating', 'publisher') or \
('tags', 'series', 'authors', 'rating', 'publisher', 'languages') or \
(fm['is_custom'] and (
fm['datatype'] in ['text', 'rating', 'series',
'enumeration'] or (
@ -1101,7 +1101,7 @@ class TagsModel(QAbstractItemModel): # {{{
ans |= Qt.ItemIsDragEnabled
fm = self.db.metadata_for_field(node.tag.category)
if node.tag.category in \
('tags', 'series', 'authors', 'rating', 'publisher') or \
('tags', 'series', 'authors', 'rating', 'publisher', 'languages') or \
(fm['is_custom'] and
fm['datatype'] in ['text', 'rating', 'series', 'enumeration']):
ans |= Qt.ItemIsDropEnabled