Draw - Fix message color mixing (#685)

Message color from previous message in Unix was mixed.
This commit is contained in:
Kirill Gavrilov
2024-03-02 15:03:11 +03:00
committed by dpasukhi
parent 4a059a8470
commit c832b192b5
2 changed files with 6 additions and 7 deletions

View File

@@ -645,11 +645,12 @@ Standard_Boolean Draw_Interprete(const char* com)
{
Message_PrinterOStream::SetConsoleTextColor(&std::cout, Message_ConsoleColor_Red, true);
}
std::cout << theCommands.Result() << std::endl;
std::cout << theCommands.Result();
if (c > 0 && theCommands.ToColorize())
{
Message_PrinterOStream::SetConsoleTextColor(&std::cout, Message_ConsoleColor_Default, false);
}
std::cout << std::endl;
}
if (Draw_Chrono && hadchrono)

View File

@@ -1250,17 +1250,15 @@ static int dputs(Draw_Interpretor& theDI, Standard_Integer theArgNb, const char*
{
Message_PrinterOStream::SetConsoleTextColor(aStream, aColor, toIntense);
}
*aStream << theArgVec[anArgIter];
if (!isNoNewline)
{
*aStream << std::endl;
}
if (toIntense || aColor != Message_ConsoleColor_Default)
{
Message_PrinterOStream::SetConsoleTextColor(aStream, Message_ConsoleColor_Default, false);
}
if (!isNoNewline)
{
*aStream << std::endl;
}
return 0;
}
else