Kaydet (Commit) 0e41aa81 authored tarafından Miklos Vajna's avatar Miklos Vajna

vcl lok: handle tracking coordinates which are in twips

This is similar to the mouse button down handling. When the map mode is
disabled and the map mode is in twips, then in general it's possible to
send mouse coordinates in twips. The scrollbar is usually in pixels, so
add extra code to still make this possible.

Change-Id: I0c7e404ecd7ac839e000266e396683bb7d15c505
(cherry picked from commit d7acb44b)
üst 457ecf7e
......@@ -1076,7 +1076,19 @@ void ScrollBar::Tracking( const TrackingEvent& rTEvt )
}
else
{
const Point rMousePos = rTEvt.GetMouseEvent().GetPosPixel();
Point aPosPixel;
if (!IsMapModeEnabled() && GetMapMode().GetMapUnit() == MAP_TWIP)
{
// rTEvt coordinates are in twips.
Push(PushFlags::MAPMODE);
EnableMapMode();
MapMode aMapMode = GetMapMode();
aMapMode.SetOrigin(Point(0, 0));
SetMapMode(aMapMode);
aPosPixel = LogicToPixel(rTEvt.GetMouseEvent().GetPosPixel());
Pop();
}
const Point rMousePos = (GetMapMode().GetMapUnit() != MAP_TWIP ? rTEvt.GetMouseEvent().GetPosPixel() : aPosPixel);
// Dragging is treated in a special way
if ( meScrollType == SCROLL_DRAG )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment