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,6 +1361,7 @@ class RatingEdit(RatingEditor, ToMetadataMixin): # {{{
|
|||||||
self.original_val = self.current_val
|
self.original_val = self.current_val
|
||||||
|
|
||||||
def commit(self, db, id_):
|
def commit(self, db, id_):
|
||||||
|
if self.current_val != self.original_val:
|
||||||
db.set_rating(id_, self.current_val, notify=False, commit=False)
|
db.set_rating(id_, self.current_val, notify=False, commit=False)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@ -1441,6 +1442,7 @@ class TagsEdit(EditWithComplete, ToMetadataMixin): # {{{
|
|||||||
self.update_items_cache(db.new_api.all_field_names('tags'))
|
self.update_items_cache(db.new_api.all_field_names('tags'))
|
||||||
|
|
||||||
def commit(self, db, id_):
|
def commit(self, db, id_):
|
||||||
|
if self.changed:
|
||||||
self.books_to_refresh |= db.set_tags(
|
self.books_to_refresh |= db.set_tags(
|
||||||
id_, self.current_val, notify=False, commit=False,
|
id_, self.current_val, notify=False, commit=False,
|
||||||
allow_case_change=True)
|
allow_case_change=True)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user