On Wednesday 16 October 2002 9:29 am, Andre Poenitz wrote:
> The patch attached sorts lables alphanumerically. This is nice
> uif you have a hundred of them and stick to the 'sec:*',
> 'eq:*' naming convention.
>
> It's a new feature though.
>
> Ok to apply anyway?

André, where is this destined to be used? If it's destined for 
the frontends, then the xforms frontend already has a "sort" 
button in the Reference dialog that does just this. This has the 
advantage of displaying in sorted or unsorted mode, whichever 
you prefer...

Angus

Index: buffer.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/buffer.C,v
retrieving revision 1.387
diff -u -p -r1.387 buffer.C
--- buffer.C    25 Sep 2002 12:19:13 -0000      1.387
+++ buffer.C    16 Oct 2002 08:22:14 -0000
@@ -3181,6 +3181,7 @@ vector<string> const Buffer::getLabelLis
                vector<string> const l = it->getLabelList();
                label_list.insert(label_list.end(), l.begin(), l.end());
        }
+       std::sort(label_list.begin(), label_list.end());
        return label_list;
 }

Reply via email to