idnode prop: allow sorting via key value on enum's
This commit is contained in:
parent
248b682c84
commit
88a2eefe2c
2 changed files with 2 additions and 1 deletions
|
@ -440,7 +440,7 @@ idnode_cmp_sort
|
|||
if (!p) return 0;
|
||||
|
||||
/* Get display string */
|
||||
if (p->islist || p->list) {
|
||||
if (p->islist || (p->list && !(p->opts & PO_SORTKEY))) {
|
||||
int r;
|
||||
char *stra = idnode_get_display(ina, p);
|
||||
char *strb = idnode_get_display(inb, p);
|
||||
|
|
|
@ -47,6 +47,7 @@ typedef enum {
|
|||
#define PO_ADVANCED 0x08 // Property is advanced
|
||||
#define PO_HIDDEN 0x10 // Property is hidden (by default)
|
||||
#define PO_USERAW 0x20 // Only save the RAW (off) value if it exists
|
||||
#define PO_SORTKEY 0x40 // Sort using key (not display value)
|
||||
|
||||
/*
|
||||
* Property definition
|
||||
|
|
Loading…
Add table
Reference in a new issue