mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Fix #1960586 [[Enhancement] Remove multiple email address at once](https://bugs.launchpad.net/calibre/+bug/1960586)
This commit is contained in:
parent
ff2bc6ecf7
commit
cad142847a
@ -29,7 +29,7 @@
|
||||
<item>
|
||||
<widget class="QTableView" name="email_view">
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::SingleSelection</enum>
|
||||
<enum>QAbstractItemView::MultiSelection</enum>
|
||||
</property>
|
||||
<property name="selectionBehavior">
|
||||
<enum>QAbstractItemView::SelectRows</enum>
|
||||
|
@ -270,7 +270,10 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
|
||||
self.changed_signal.emit()
|
||||
|
||||
def remove_email_account(self, *args):
|
||||
idx = self.email_view.currentIndex()
|
||||
row_map = {}
|
||||
for idx in self.email_view.selectionModel().selectedIndexes():
|
||||
row_map[idx.row()] = idx
|
||||
for idx in sorted(row_map.values(), reverse=True):
|
||||
self._email_accounts.remove(idx)
|
||||
self.changed_signal.emit()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user