mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1939538 [Single metadata edit dialog always chages the tags even if not modified](https://bugs.launchpad.net/calibre/+bug/1939538)
This commit is contained in:
parent
e2c9a16829
commit
f16d7fb89f
@ -1361,7 +1361,8 @@ class RatingEdit(RatingEditor, ToMetadataMixin): # {{{
|
||||
self.original_val = self.current_val
|
||||
|
||||
def commit(self, db, id_):
|
||||
db.set_rating(id_, self.current_val, notify=False, commit=False)
|
||||
if self.current_val != self.original_val:
|
||||
db.set_rating(id_, self.current_val, notify=False, commit=False)
|
||||
return True
|
||||
|
||||
def zero(self):
|
||||
@ -1441,9 +1442,10 @@ class TagsEdit(EditWithComplete, ToMetadataMixin): # {{{
|
||||
self.update_items_cache(db.new_api.all_field_names('tags'))
|
||||
|
||||
def commit(self, db, id_):
|
||||
self.books_to_refresh |= db.set_tags(
|
||||
id_, self.current_val, notify=False, commit=False,
|
||||
allow_case_change=True)
|
||||
if self.changed:
|
||||
self.books_to_refresh |= db.set_tags(
|
||||
id_, self.current_val, notify=False, commit=False,
|
||||
allow_case_change=True)
|
||||
return True
|
||||
|
||||
def keyPressEvent(self, ev):
|
||||
|
Loading…
x
Reference in New Issue
Block a user