diff --git a/src/Gui/PythonConsole.cpp b/src/Gui/PythonConsole.cpp index a8306d693..28586eb4c 100644 --- a/src/Gui/PythonConsole.cpp +++ b/src/Gui/PythonConsole.cpp @@ -786,8 +786,10 @@ bool PythonConsole::isComment(const QString& source) const QChar ch = source.at(i++); if (ch.isSpace()) continue; - if (ch == QLatin1Char('#')) + else if (ch == QLatin1Char('#')) return true; + else + return false; } return false;