In drawpanel.cpp there is something like this:
286
if( screenPos.y < clientRect.GetTop() )
287
y -= m_scrollIncrementY * yPpu;
288
else if( screenPos.y > clientRect.GetBottom() )
289
y += m_scrollIncrementY * yPpu;
290
else if( clientRect.GetRight() < screenPos.x )
291
x += m_scrollIncrementX * xPpu;
292
else
293
x -= m_scrollIncrementX * xPpu;
Why do You mix checking vertical and horizontal ranges together?
It would be more clear to use something like:
if(vertical rule)
else if(another vertical rule)
else
and
if(horizontal rule)
else (another horizontal rule)
else ..
I am not c++ developer, so I may be wrong, but in my opinion it could
be potential place for bug.
Can someone check it ?
In drawpanel.cpp there is something like this: GetBottom( ) ) GetRight( ) < screenPos.x )
286
if( screenPos.y < clientRect.GetTop() )
287
y -= m_scrollIncrementY * yPpu;
288
else if( screenPos.y > clientRect.
289
y += m_scrollIncrementY * yPpu;
290
else if( clientRect.
291
x += m_scrollIncrementX * xPpu;
292
else
293
x -= m_scrollIncrementX * xPpu;
Why do You mix checking vertical and horizontal ranges together?
It would be more clear to use something like:
if(vertical rule)
else if(another vertical rule)
else
and
if(horizontal rule)
else (another horizontal rule)
else ..
I am not c++ developer, so I may be wrong, but in my opinion it could
be potential place for bug.
Can someone check it ?