diff --git a/scripts/drag_drop_handler.lua b/scripts/drag_drop_handler.lua index 36c2bd25ce..f981d3abd1 100644 --- a/scripts/drag_drop_handler.lua +++ b/scripts/drag_drop_handler.lua @@ -33,6 +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(".", "_") return [[openspace.addScreenSpaceRenderable({ Identifier = "]] .. identifier .. [[", Type = "ScreenSpaceImageLocal", diff --git a/src/properties/propertyowner.cpp b/src/properties/propertyowner.cpp index 4426580f8d..a434ac357a 100644 --- a/src/properties/propertyowner.cpp +++ b/src/properties/propertyowner.cpp @@ -399,11 +399,11 @@ void PropertyOwner::removePropertySubOwner(openspace::properties::PropertyOwner& void PropertyOwner::setIdentifier(std::string identifier) { ghoul_precondition( _identifier.find_first_of("\t\n ") == std::string::npos, - "Identifier must contain any whitespaces" + "Identifier must not contain any whitespaces" ); ghoul_precondition( _identifier.find_first_of('.') == std::string::npos, - "Identifier must contain any whitespaces" + "Identifier must not contain any dots" ); _identifier = std::move(identifier);