mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-10 00:46:55 +02:00
Merge pull request #242 from kelvie/diff-tag-fix
Fix diff/intersect when some tags are hidden
This commit is contained in:
@@ -1235,6 +1235,8 @@ module show(tags="")
|
||||
// }
|
||||
module diff(neg, pos=undef, keep=undef)
|
||||
{
|
||||
// Don't perform the operation if the current tags are hidden
|
||||
if (attachment_is_shown($tags)) {
|
||||
difference() {
|
||||
if (pos != undef) {
|
||||
show(pos) children();
|
||||
@@ -1247,6 +1249,7 @@ module diff(neg, pos=undef, keep=undef)
|
||||
}
|
||||
show(neg) children();
|
||||
}
|
||||
}
|
||||
if (keep!=undef) {
|
||||
show(keep) children();
|
||||
} else if (pos!=undef) {
|
||||
@@ -1280,6 +1283,8 @@ module diff(neg, pos=undef, keep=undef)
|
||||
// }
|
||||
module intersect(a, b=undef, keep=undef)
|
||||
{
|
||||
// Don't perform the operation if the current tags are hidden
|
||||
if (attachment_is_shown($tags)) {
|
||||
intersection() {
|
||||
if (b != undef) {
|
||||
show(b) children();
|
||||
@@ -1292,6 +1297,7 @@ module intersect(a, b=undef, keep=undef)
|
||||
}
|
||||
show(a) children();
|
||||
}
|
||||
}
|
||||
if (keep!=undef) {
|
||||
show(keep) children();
|
||||
} else if (b!=undef) {
|
||||
|
Reference in New Issue
Block a user