# HG changeset patch # User Teemu Piippo # Date 1632856672 -10800 # Node ID 5d73a67173219ab74e0f38ae51f02f94451c9600 # Parent 7b62c52835a10b088211dffddba260d5c0559aed Fix handling of "BFC INVERTNEXT" with multiple inner whitespaces diff -r 7b62c52835a1 -r 5d73a6717321 src/parser.cpp --- a/src/parser.cpp Tue Sep 28 22:14:00 2021 +0300 +++ b/src/parser.cpp Tue Sep 28 22:17:52 2021 +0300 @@ -240,7 +240,10 @@ this->bag.append(this->readLine()); for (const QString& line : this->bag) { - if (line == "0 BFC INVERTNEXT" or line == "0 BFC CERTIFY INVERTNEXT") + // Some LDraw parts such as 53588.dat can contain "BFC INVERTNEXT" with multiple inner whitespaces. + // So we need to pass the string through QString::simplified to catch these cases. + const QString simplifiedLine = line.simplified(); + if (simplifiedLine == "0 BFC INVERTNEXT" or simplifiedLine == "0 BFC CERTIFY INVERTNEXT") { invertNext = true; continue;