mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-10 22:04:00 +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)
|
module diff(neg, pos=undef, keep=undef)
|
||||||
{
|
{
|
||||||
|
// Don't perform the operation if the current tags are hidden
|
||||||
|
if (attachment_is_shown($tags)) {
|
||||||
difference() {
|
difference() {
|
||||||
if (pos != undef) {
|
if (pos != undef) {
|
||||||
show(pos) children();
|
show(pos) children();
|
||||||
@@ -1247,6 +1249,7 @@ module diff(neg, pos=undef, keep=undef)
|
|||||||
}
|
}
|
||||||
show(neg) children();
|
show(neg) children();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (keep!=undef) {
|
if (keep!=undef) {
|
||||||
show(keep) children();
|
show(keep) children();
|
||||||
} else if (pos!=undef) {
|
} else if (pos!=undef) {
|
||||||
@@ -1280,6 +1283,8 @@ module diff(neg, pos=undef, keep=undef)
|
|||||||
// }
|
// }
|
||||||
module intersect(a, b=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() {
|
intersection() {
|
||||||
if (b != undef) {
|
if (b != undef) {
|
||||||
show(b) children();
|
show(b) children();
|
||||||
@@ -1292,6 +1297,7 @@ module intersect(a, b=undef, keep=undef)
|
|||||||
}
|
}
|
||||||
show(a) children();
|
show(a) children();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (keep!=undef) {
|
if (keep!=undef) {
|
||||||
show(keep) children();
|
show(keep) children();
|
||||||
} else if (b!=undef) {
|
} else if (b!=undef) {
|
||||||
|
Reference in New Issue
Block a user