summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLex Neva <github.com@lexneva.name>2018-05-02 20:09:52 -0400
committerLex Neva <github.com@lexneva.name>2018-05-02 20:09:52 -0400
commitd09ba5362b77808040254c109df44b3e6c45382d (patch)
treeddaa54e6214e11a9c332ccb010504663da7134f1
parent83a0edc1b656dd2914b0211d3992e91b6830d9ed (diff)
handle case where no palette is used
-rw-r--r--embroider_print.py2
-rw-r--r--print/templates/ui.html2
2 files changed, 2 insertions, 2 deletions
diff --git a/embroider_print.py b/embroider_print.py
index ee9193a8..5895bc51 100644
--- a/embroider_print.py
+++ b/embroider_print.py
@@ -377,7 +377,7 @@ class Print(InkstitchExtension):
svg_overview = overview_svg,
color_blocks = stitch_plan.color_blocks,
palettes = ThreadCatalog().palette_names(),
- selected_palette = palette.name,
+ selected_palette = palette,
)
# We've totally mucked with the SVG. Restore it so that we can save
diff --git a/print/templates/ui.html b/print/templates/ui.html
index 112a342e..b09dc941 100644
--- a/print/templates/ui.html
+++ b/print/templates/ui.html
@@ -42,7 +42,7 @@
<option value="" selected>None</option>
{% endif %}
{% for palette in palettes %}
- <option value="{{ palette }}" {{ "selected" if palette == selected_palette else "" }}>{{ palette }}</option>
+ <option value="{{ palette }}" {{ "selected" if palette == selected_palette.name else "" }}>{{ palette }}</option>
{% endfor %}
</select>
</p>