Accumulate drag offset if time delta is less than 1 ns.

This commit is contained in:
Bartosz Taudul 2017-09-22 21:39:14 +02:00
parent 7b3a0057ca
commit 21fd14397d

View File

@ -755,10 +755,14 @@ void View::DrawZones()
m_pause = true; m_pause = true;
const auto delta = ImGui::GetMouseDragDelta( 1, 0 ).x; const auto delta = ImGui::GetMouseDragDelta( 1, 0 ).x;
const auto nspx = double( timespan ) / w; const auto nspx = double( timespan ) / w;
m_zvStart -= int64_t( delta * nspx ); const auto dpx = int64_t( delta * nspx );
m_zvEnd -= int64_t( delta * nspx ); if( dpx != 0 )
{
m_zvStart -= dpx;
m_zvEnd -= dpx;
io.MouseClickedPos[1].x = io.MousePos.x; io.MouseClickedPos[1].x = io.MousePos.x;
} }
}
const auto wheel = io.MouseWheel; const auto wheel = io.MouseWheel;
if( wheel != 0 ) if( wheel != 0 )