mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Edit metadata dialog: When setting the series from a format or via metadata download, ensure that the series index is not automatically changed, when closing the dialog. Fixes #918751 (Series numbering sometimes incorrect)
This commit is contained in:
parent
f50122805c
commit
5e677a39a5
@ -573,6 +573,9 @@ class SeriesIndexEdit(QDoubleSpinBox):
|
|||||||
import traceback
|
import traceback
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
|
|
||||||
|
def reset_original(self):
|
||||||
|
self.original_series_name = self.series_edit.current_val
|
||||||
|
|
||||||
def break_cycles(self):
|
def break_cycles(self):
|
||||||
try:
|
try:
|
||||||
self.series_edit.currentIndexChanged.disconnect()
|
self.series_edit.currentIndexChanged.disconnect()
|
||||||
|
@ -376,6 +376,7 @@ class MetadataSingleDialogBase(ResizableDialog):
|
|||||||
if not mi.is_null('series') and mi.series.strip():
|
if not mi.is_null('series') and mi.series.strip():
|
||||||
self.series.current_val = mi.series
|
self.series.current_val = mi.series
|
||||||
if mi.series_index is not None:
|
if mi.series_index is not None:
|
||||||
|
self.series_index.reset_original()
|
||||||
self.series_index.current_val = float(mi.series_index)
|
self.series_index.current_val = float(mi.series_index)
|
||||||
if not mi.is_null('languages'):
|
if not mi.is_null('languages'):
|
||||||
langs = [canonicalize_lang(x) for x in mi.languages]
|
langs = [canonicalize_lang(x) for x in mi.languages]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user