Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order of structure of symbols #246

Open
christiankral opened this issue May 10, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@christiankral
Copy link

commented May 10, 2019

When selecting the group of symbols I get a different sort order of the groups each time I restart IPE.

image

image

The order of symbols within the group appears always in the same way, however.

This issue is related with #237 and version 7.2.12 of IPE (Linux 64bit Ubuntu 16.04 version)

@otfried

This comment has been minimized.

Copy link
Owner

commented May 10, 2019

Indeed, the Lua map is a hash table and is not deterministic.

In any case, one should probably sort the group names alphabetically. I'll fix it in the next release. You can do it yourself by inserting the table.sort call in the function select_symbol in symbols.lua, like this:

  local groups = {}
  for g,sbg in pairs(symbolsByGroup) do
    groups[#groups+1] = g
  end
  table.sort(groups)
  local d = ipeui.Dialog(model.ui:win(), "Use symbol")
  groups.action = function (d)
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.