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

UIEditor : Sanitize new preset names #3103

Merged
merged 1 commit into from Apr 4, 2019

Conversation

mattigruener
Copy link
Contributor

Hey John,

quick one to address SG14300. Ticket text:

"if i add a preset value to a plug with a name like
something / something
it seems to interpret the / as a submenu and i can no longer edit items in the preset list"

Would you rather have this replace the / with a space or something else?

Matti.

@mattigruener mattigruener changed the title UIEditor : replace '/' by '_' so that we don't mistake the new entry … UIEditor : Sanitize new preset names Apr 3, 2019
@johnhaddon johnhaddon merged commit ef00812 into GafferHQ:master Apr 4, 2019
@johnhaddon
Copy link
Member

Thanks Matti - _ makes sense to me. I've merged as I think this is a good short term fix, but I'm going to leave a few comments here for future reference :

  • I think the "'/' makes a submenu" thing is actually reasonably useful, and I do use it when making presets via scripting. We probably also need a way of disabling that - maybe escaping?
  • The "/" throws the preset listing off because the preset listing is a PathListingWidget, and paths treat "/" differently.
  • In the past I tried keeping support for "/" by doing some remapping back and forth in the Paths given to the PathListingWidget, but it quickly got a bit more involved than the quick fix I was looking for. I think this might still be a worthwhile longer term approach though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants