From 3dc257658fb8b93bd95b25fa49cafc784a22d250 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 14 Dec 2010 21:27:04 +0000 Subject: [PATCH] Reverse pointer y coordinate in manipulator --- source/designer/manipulator.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/designer/manipulator.cpp b/source/designer/manipulator.cpp index 720309b..b41b29e 100644 --- a/source/designer/manipulator.cpp +++ b/source/designer/manipulator.cpp @@ -372,8 +372,8 @@ void Manipulator::button_press(int, int, unsigned btn, unsigned) void Manipulator::pointer_motion(int x, int y) { - pointer_y = y; - gpointer = designer.map_pointer_to_ground(x, event_source.get_height()-1-y); + pointer_y = event_source.get_height()-1-y; + gpointer = designer.map_pointer_to_ground(x, pointer_y); if(mode==MOVE) { @@ -434,7 +434,7 @@ void Manipulator::pointer_motion(int x, int y) } else if(mode==ELEVATE) { - float dz = (y-elev_origin)/1000.; + float dz = (pointer_y-elev_origin)/1000.; signal_status.emit(format("Elevation: %+.0fmm (%.0fmm)", dz*1000, (center.z+dz)*1000)); -- 2.43.0