Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Taudul <wolf.pld@gmail.com>2019-08-10 23:06:51 +0300
committerBartosz Taudul <wolf.pld@gmail.com>2019-08-10 23:06:51 +0300
commit530f293c49c79e85391668c2ce68e5cc91974584 (patch)
tree0f0db6614f3ece01813ab9574f9a692733f4899a /server/TracyView.cpp
parent6fca188603ec28d2ed1feb16027db581d020f0d5 (diff)
Better way to handle auto scrolling.
Diffstat (limited to 'server/TracyView.cpp')
-rw-r--r--server/TracyView.cpp18
1 files changed, 2 insertions, 16 deletions
diff --git a/server/TracyView.cpp b/server/TracyView.cpp
index b24ed0d2..3355ab88 100644
--- a/server/TracyView.cpp
+++ b/server/TracyView.cpp
@@ -5964,24 +5964,10 @@ void View::DrawMessages()
}
m_visibleMessages = msgcnt;
- if( !filterActive )
+ if( ImGui::GetScrollY() >= ImGui::GetScrollMaxY() )
{
- const auto maxScroll = ImGui::GetScrollMaxY();
- if( maxScroll != 0 )
- {
- const auto msgssize = msgs.size();
- if( m_prevMessages == msgssize && !m_messageFilterWasActive )
- {
- m_messagesScrollBottom = ImGui::GetScrollY() == maxScroll;
- }
- else
- {
- m_prevMessages = msgssize;
- if( m_messagesScrollBottom ) ImGui::SetScrollHereY();
- }
- }
+ ImGui::SetScrollHereY( 1.f );
}
- m_messageFilterWasActive = filterActive;
ImGui::EndColumns();
ImGui::EndChild();