mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-25 23:44:35 +00:00
Accumulate drag offset if time delta is less than 1 ns.
This commit is contained in:
parent
7b3a0057ca
commit
21fd14397d
@ -755,9 +755,13 @@ void View::DrawZones()
|
||||
m_pause = true;
|
||||
const auto delta = ImGui::GetMouseDragDelta( 1, 0 ).x;
|
||||
const auto nspx = double( timespan ) / w;
|
||||
m_zvStart -= int64_t( delta * nspx );
|
||||
m_zvEnd -= int64_t( delta * nspx );
|
||||
io.MouseClickedPos[1].x = io.MousePos.x;
|
||||
const auto dpx = int64_t( delta * nspx );
|
||||
if( dpx != 0 )
|
||||
{
|
||||
m_zvStart -= dpx;
|
||||
m_zvEnd -= dpx;
|
||||
io.MouseClickedPos[1].x = io.MousePos.x;
|
||||
}
|
||||
}
|
||||
|
||||
const auto wheel = io.MouseWheel;
|
||||
|
Loading…
Reference in New Issue
Block a user