mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
Make patterns not be copied on the main directory - Fixes #1010
This commit is contained in:
parent
8e9ba696f1
commit
aa47a47b3c
|
@ -332,16 +332,11 @@ func _load_palettes() -> void:
|
||||||
search_locations.reverse()
|
search_locations.reverse()
|
||||||
priority_ordered_files.reverse()
|
priority_ordered_files.reverse()
|
||||||
for i in range(search_locations.size()):
|
for i in range(search_locations.size()):
|
||||||
# If palette is not in palettes write path - make its copy in the write path
|
|
||||||
var make_copy := false
|
|
||||||
if search_locations[i] != palettes_write_path:
|
|
||||||
make_copy = true
|
|
||||||
|
|
||||||
var base_directory := search_locations[i]
|
var base_directory := search_locations[i]
|
||||||
var palette_files := priority_ordered_files[i]
|
var palette_files := priority_ordered_files[i]
|
||||||
for file_name in palette_files:
|
for file_name in palette_files:
|
||||||
var path := base_directory.path_join(file_name)
|
var path := base_directory.path_join(file_name)
|
||||||
import_palette_from_path(path, make_copy, true)
|
import_palette_from_path(path, false, true)
|
||||||
|
|
||||||
if not current_palette && palettes.size() > 0:
|
if not current_palette && palettes.size() > 0:
|
||||||
select_palette(palettes.keys()[0])
|
select_palette(palettes.keys()[0])
|
||||||
|
@ -383,7 +378,6 @@ func _get_palette_files(path: String) -> PackedStringArray:
|
||||||
|
|
||||||
if !dir:
|
if !dir:
|
||||||
return []
|
return []
|
||||||
|
|
||||||
dir.list_dir_begin()
|
dir.list_dir_begin()
|
||||||
|
|
||||||
while true:
|
while true:
|
||||||
|
|
Loading…
Reference in a new issue