mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 09:09:47 +00:00
Fix issue where the '\n` escape character got inserted inside the palette name, causing it to fail to be saved
This commit is contained in:
parent
ab6c54ecb1
commit
702197c639
|
@ -463,9 +463,9 @@ func _import_gpl(path: String, text: String) -> Palette:
|
|||
comments += line.trim_prefix("#") + "\n"
|
||||
# Some programs output palette name in a comment for old format
|
||||
if line.begins_with("#Palette Name: "):
|
||||
palette_name = line.replace("#Palette Name: ", "")
|
||||
palette_name = line.replace("#Palette Name: ", "").strip_edges()
|
||||
elif line.begins_with("Name: "):
|
||||
palette_name = line.replace("Name: ", "")
|
||||
palette_name = line.replace("Name: ", "").strip_edges()
|
||||
elif line.begins_with("Columns: "):
|
||||
# The width of the palette.
|
||||
line = line.trim_prefix("Columns: ").strip_edges()
|
||||
|
|
|
@ -7,7 +7,9 @@ const DEFAULT_WIDTH := 8
|
|||
const DEFAULT_HEIGHT := 8
|
||||
|
||||
# Metadata
|
||||
var name := "Custom Palette"
|
||||
var name := "Custom Palette":
|
||||
set(value):
|
||||
name = value.strip_edges()
|
||||
var comment := ""
|
||||
var path := ""
|
||||
|
||||
|
|
Loading…
Reference in a new issue