Fix identifier being replaced with underscores on image drag drop (closes #1874)

Note: The dot selector matches all characters. Oops
This commit is contained in:
Emma Broman
2022-02-02 14:04:33 +01:00
parent 8b74493d96
commit 4a3abf58ee

View File

@@ -33,7 +33,7 @@ local ReloadUIScript = [[ if openspace.hasProperty('Modules.CefWebGui.Reload') t
if is_image_file(extension) then
identifier = basename_without_extension:gsub(" ", "_")
identifier = identifier:gsub(".", "_")
identifier = identifier:gsub("%p", "_") -- replace all punctuation characters with '_'
return [[openspace.addScreenSpaceRenderable({
Identifier = "]] .. identifier .. [[",
Type = "ScreenSpaceImageLocal",