From c25d3a3f67678a1023da1b15673e782d863b669b Mon Sep 17 00:00:00 2001 From: Adrian Mariano Date: Sun, 20 Mar 2022 09:03:18 -0400 Subject: [PATCH] bug fixes for "default" color --- attachments.scad | 10 ++-------- builtins.scad | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/attachments.scad b/attachments.scad index 207490b..f8310e8 100644 --- a/attachments.scad +++ b/attachments.scad @@ -1413,14 +1413,8 @@ module attachable( $parent_size = _attach_geom_size(geom); $attach_to = undef; do_show = _attachment_is_shown($tags); - if (do_show) { - if (is_undef($color) || $color=="default") { - children(0); - } else color($color) { - $color = undef; - children(0); - } - } + if (do_show) + _color($color) children(0); if (is_def($save_color)) { $color=$save_color; $save_color=undef; diff --git a/builtins.scad b/builtins.scad index 31d7b72..1693a27 100644 --- a/builtins.scad +++ b/builtins.scad @@ -19,7 +19,7 @@ module _text(text,size,font,halign,valign,spacing,direction,language,script) language=language, script=script ); -module _color(color) if (color==undef) children(); else color(color) children(); +module _color(color) if (color==undef || color=="default") children(); else color(color) children(); module _cube(size,center) cube(size,center=center);