[Ipe-discuss] Dropdown menu order

Otfried Cheong ipe at otfried.org
Sun Jun 27 23:24:55 CEST 2021

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.


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).


More information about the Ipe-discuss mailing list