From raedislammohsen at gmail.com Sun Jun 27 16:20:53 2021 From: raedislammohsen at gmail.com (Raed Mohsen) Date: Sun, 27 Jun 2021 10:20:53 -0400 Subject: [Ipe-discuss] Dropdown menu order Message-ID: Hi, I used my own style sheet for additional grid sizes, colors and other customized features. I noticed that in the old version (ipe-7.2.7) I used, the grid size dropdown menu was in the same order I added them in the style sheet. In the newest version (ipe-7.2.24), it is ordered by the name. Please check the attached photos for clarification. Is there a way to keep the order as it used to be? Regards -- Raed Saasaa Power Electronics Engineer Murata Power Solutions | Toronto, Canada Phone: +1 250 899 6079 https://www.linkedin.com/in/raedsaasaa Virus-free. www.avg.com <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 1.png Type: image/png Size: 6343 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 2.png Type: image/png Size: 6061 bytes Desc: not available URL: From ipe at otfried.org Sun Jun 27 23:24:55 2021 From: ipe at otfried.org (Otfried Cheong) Date: Sun, 27 Jun 2021 23:24:55 +0200 Subject: [Ipe-discuss] Dropdown menu order In-Reply-To: References: Message-ID: On Sun, Jun 27, 2021, at 16:20, Raed Mohsen via Ipe-discuss wrote: > I used my own style sheet for additional grid sizes, colors and other > customized features. > > I noticed that in the old version (ipe-7.2.7) I used, the grid size > dropdown menu was in the same order I added them in the style sheet. In > the newest version (ipe-7.2.24), it is ordered by the name. Please > check the attached photos for clarification. > Is there a way to keep the order as it used to be? There was never a predefined order for the symbolic names: they simply appear in the order in which the attribute map returns them. The old behaviour was a specific implementation, which perhaps has changed in the C++ library. See https://github.com/otfried/ipe-issues/issues/383 https://github.com/otfried/ipe-issues/issues/65 The reason I have not changed it is that it is not clear what the right implementation is. Some users would prefer the names to be alphabetically sorted, others want the order from the style sheet (which is not actually preserved by Ipe and is not well defined, because symbolic names can be defined in dozens of style sheets in the current cascade), and others asked for frequently used names to be put on the top. The current plan was to move the least-recently used name to the top. Another option would be to allow a preference to specify a preferred order, something like this: prefs.attribute_order.color = { "black", "white", "red", "pink" } which would then make sure that these attributes appear at the top of the list in this order (assuming an attribute of that name actually exists). Cheers, Otfried