mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
Fixes: the UI didn't properly delete links
This commit is contained in:
parent
ff4ed26896
commit
d95d7f4048
@ -2397,6 +2397,8 @@ class Cache:
|
|||||||
values, not field ids.
|
values, not field ids.
|
||||||
|
|
||||||
returns books changed by setting the link
|
returns books changed by setting the link
|
||||||
|
|
||||||
|
NB: this method doesn't change values not in the value_to_link_map
|
||||||
'''
|
'''
|
||||||
if field not in self.fields:
|
if field not in self.fields:
|
||||||
raise ValueError(f'Lookup name {field} is not a valid name')
|
raise ValueError(f'Lookup name {field} is not a valid name')
|
||||||
|
@ -546,6 +546,8 @@ class TagListEditor(QDialog, Ui_TagListEditor):
|
|||||||
self.table.blockSignals(False)
|
self.table.blockSignals(False)
|
||||||
|
|
||||||
def finish_editing(self, edited_item):
|
def finish_editing(self, edited_item):
|
||||||
|
if edited_item.column != 0:
|
||||||
|
return
|
||||||
if not edited_item.text():
|
if not edited_item.text():
|
||||||
error_dialog(self, _('Item is blank'), _(
|
error_dialog(self, _('Item is blank'), _(
|
||||||
'An item cannot be set to nothing. Delete it instead.'), show=True)
|
'An item cannot be set to nothing. Delete it instead.'), show=True)
|
||||||
@ -680,7 +682,5 @@ class TagListEditor(QDialog, Ui_TagListEditor):
|
|||||||
def accepted(self):
|
def accepted(self):
|
||||||
self.links = {}
|
self.links = {}
|
||||||
for r in range(0, self.table.rowCount()):
|
for r in range(0, self.table.rowCount()):
|
||||||
l = self.table.item(r, 3).text()
|
self.links[self.table.item(r, 0).text()] = self.table.item(r, 3).text()
|
||||||
if l:
|
|
||||||
self.links[self.table.item(r, 0).text()] = l
|
|
||||||
self.save_geometry()
|
self.save_geometry()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user