mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-27 04:14:15 +02:00
Ooops. That fix had side effects even if there were errors
This commit is contained in:
parent
dac7563405
commit
03b3574e8e
1 changed files with 2 additions and 2 deletions
|
|
@ -543,8 +543,6 @@ def accept(self):
|
|||
|
||||
default_val = (unicode_type(self.default_value.text()).strip()
|
||||
if col_type != 'composite' else None)
|
||||
if self.editing_col:
|
||||
self.parent.custcols[self.orig_column_name]['display'].pop('default_value', None)
|
||||
|
||||
if col_type == 'datetime':
|
||||
if unicode_type(self.format_box.text()).strip():
|
||||
|
|
@ -668,6 +666,8 @@ def accept(self):
|
|||
else:
|
||||
self.parent.custcols[self.orig_column_name]['label'] = col
|
||||
self.parent.custcols[self.orig_column_name]['name'] = col_heading
|
||||
# Remove any previous default value
|
||||
self.parent.custcols[self.orig_column_name]['display'].pop('default_value', None)
|
||||
self.parent.custcols[self.orig_column_name]['display'].update(display_dict)
|
||||
self.parent.custcols[self.orig_column_name]['*edited'] = True
|
||||
self.parent.custcols[self.orig_column_name]['*must_restart'] = True
|
||||
|
|
|
|||
Loading…
Reference in a new issue