mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
pep8
This commit is contained in:
parent
079c685f1a
commit
6690397d1a
@ -1089,7 +1089,7 @@ class TagsModel(QAbstractItemModel): # {{{
|
|||||||
fm = self.db.metadata_for_field(node.tag.category)
|
fm = self.db.metadata_for_field(node.tag.category)
|
||||||
if node.tag.category in \
|
if node.tag.category in \
|
||||||
('tags', 'series', 'authors', 'rating', 'publisher') or \
|
('tags', 'series', 'authors', 'rating', 'publisher') or \
|
||||||
(fm['is_custom'] and \
|
(fm['is_custom'] and
|
||||||
fm['datatype'] in ['text', 'rating', 'series', 'enumeration']):
|
fm['datatype'] in ['text', 'rating', 'series', 'enumeration']):
|
||||||
ans |= Qt.ItemIsDropEnabled
|
ans |= Qt.ItemIsDropEnabled
|
||||||
else:
|
else:
|
||||||
@ -1193,7 +1193,8 @@ class TagsModel(QAbstractItemModel): # {{{
|
|||||||
exclusive: clear all states before applying this one
|
exclusive: clear all states before applying this one
|
||||||
set_to: None => advance the state, otherwise a value from TAG_SEARCH_STATES
|
set_to: None => advance the state, otherwise a value from TAG_SEARCH_STATES
|
||||||
'''
|
'''
|
||||||
if not index.isValid(): return False
|
if not index.isValid():
|
||||||
|
return False
|
||||||
item = self.get_node(index)
|
item = self.get_node(index)
|
||||||
item.toggle(set_to=set_to)
|
item.toggle(set_to=set_to)
|
||||||
if exclusive:
|
if exclusive:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user