summaryrefslogtreecommitdiff
path: root/gerbonara
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2022-06-19 00:50:52 +0200
committerjaseg <git@jaseg.de>2022-06-19 00:50:52 +0200
commitf1ac559eb340a81279688338fe4f70b415f799c9 (patch)
tree9285b8c75c20617a2f459039f565425db6b540f9 /gerbonara
parent748ab7ccf205e99c2997db241cb5b7623a9631b2 (diff)
downloadgerbonara-f1ac559eb340a81279688338fe4f70b415f799c9.tar.gz
gerbonara-f1ac559eb340a81279688338fe4f70b415f799c9.tar.bz2
gerbonara-f1ac559eb340a81279688338fe4f70b415f799c9.zip
Make name generation for layer stack saving smarter
Diffstat (limited to 'gerbonara')
-rw-r--r--gerbonara/layers.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/gerbonara/layers.py b/gerbonara/layers.py
index dafb7d5..77ca064 100644
--- a/gerbonara/layers.py
+++ b/gerbonara/layers.py
@@ -436,8 +436,10 @@ class LayerStack:
if layer_type in naming_scheme:
path = naming_scheme[layer_type].format(layer_number=num, board_name=self.board_name)
- else:
+ elif layer.original_path.name:
path = layer.original_path.name
+ else:
+ path = f'{self.board_name}-{layer_type.replace(" ", "_")}.gbr'
return path