Demo: Fixed "Log" demo not initializing properly, leading to the first line not showing before a Clear. (#2318) [@bluescan]

This commit is contained in:
omar
2019-01-29 14:36:55 +01:00
parent 8a4422b2fa
commit ed240c910b
2 changed files with 7 additions and 0 deletions

View File

@ -3397,6 +3397,12 @@ struct ExampleAppLog
ImVector<int> LineOffsets; // Index to lines offset. We maintain this with AddLog() calls, allowing us to have a random access on lines
bool ScrollToBottom;
ExampleAppLog()
{
ScrollToBottom = false;
Clear();
}
void Clear()
{
Buf.clear();