From 0f0b4919393ce8503ea9fec36a5766836e0db802 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Mon, 8 Apr 2019 13:47:56 +0200 Subject: [PATCH] fixed invalid bitruncation in torus geometries --- geom-exp.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/geom-exp.cpp b/geom-exp.cpp index e0e395aa..65480541 100644 --- a/geom-exp.cpp +++ b/geom-exp.cpp @@ -141,7 +141,7 @@ void showTorusConfig() { dialog::addSelItem(XLAT("height (y)"), its(torusconfig::newsdy), 'y'); } - if(square) dialog::addBoolItem(XLAT("bitruncated"), !torus_bitrunc, 't'); + if(square) dialog::addBoolItem(XLAT("bitruncated"), torus_bitrunc, 't'); else dialog::addInfo("", 100); int valid = 2; @@ -150,7 +150,7 @@ void showTorusConfig() { if(single) { if(square) { dialog::addInfo("this mode has bad patterns", 0x808080), valid = 1; - if(!torus_bitrunc && valid == 1) + if(torus_bitrunc && valid == 1 && (torusconfig::newqty%2 || torusconfig::newdy % 2 == 0)) dialog::addInfo("incompatible with bitruncating", 0x808080), valid = 0; } else { @@ -168,7 +168,7 @@ void showTorusConfig() { dialog::addInfo(XLAT("best if %1 is divisible by %2", "y", "2"), 0x808080), valid = 1; if(torusconfig::newsdx & 1) dialog::addInfo(XLAT("best if %1 is divisible by %2", "x", "2"), 0x808080), valid = 1; - if(!torus_bitrunc && valid == 1) + if(torus_bitrunc && valid == 1) dialog::addInfo("incompatible with bitruncating", 0x808080), valid = 0; if(klein && !torusconfig::mobius_symmetric(square, adx, ady)) dialog::addInfo("Möbius band requires a symmetric period", 0x800000), valid = 0; @@ -188,7 +188,7 @@ void showTorusConfig() { dialog::addInfo(XLAT("best if %1 is divisible by %2", "x", "2"), 0x808080), valid = 1; if(torusconfig::newsdy & 1) dialog::addInfo(XLAT("best if %1 is divisible by %2", "y", "2"), 0x808080), valid = 1; - if(!torus_bitrunc && valid == 1) + if(torus_bitrunc && valid == 1) dialog::addInfo("incompatible with bitruncating", 0x808080), valid = 0; } else if(simple) {