mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
In the Sort by tool, use a combo box when saving to make it easier to replace an existing sort.
This commit is contained in:
parent
d153d026e9
commit
dbd0d591cf
@ -143,9 +143,13 @@ class ChooseMultiSort(Dialog):
|
||||
spec = self.current_sort_spec
|
||||
if not spec:
|
||||
return self.no_column_selected_error()
|
||||
name, ok = QInputDialog.getText(self, _('Choose name'),
|
||||
_('Choose a name for these settings'))
|
||||
if ok:
|
||||
d = QInputDialog(self)
|
||||
d.setComboBoxEditable(True)
|
||||
d.setComboBoxItems(self.saved_specs.keys())
|
||||
d.setWindowTitle(_('Choose name'))
|
||||
d.setLabelText(_('Choose a name for these settings'))
|
||||
if d.exec():
|
||||
name = d.textValue()
|
||||
q = self.saved_specs
|
||||
q[name] = spec
|
||||
self.saved_specs = q
|
||||
|
Loading…
x
Reference in New Issue
Block a user