Fix #1926852 [[Enhancement] Warn before removing news source from the Add custom news sources window](https://bugs.launchpad.net/calibre/+bug/1926852)

This commit is contained in:
Kovid Goyal 2021-05-02 13:48:39 +05:30
parent 5d73aa715f
commit 7f21e3692e
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -271,6 +271,7 @@ class RecipeList(QWidget): # {{{
def remove(self):
idx = self.view.currentIndex()
if idx.isValid():
if confirm_delete(_('Are you sure you want to permanently remove this recipe?'), 'remove-custom-recipe', parent=self):
self.model.remove((idx.row(),))
self.select_row()
if self.model.rowCount() == 0: