From: Mikko Rasa Date: Tue, 14 Dec 2010 21:27:04 +0000 (+0000) Subject: Reverse pointer y coordinate in manipulator X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=3dc257658fb8b93bd95b25fa49cafc784a22d250;p=r2c2.git Reverse pointer y coordinate in manipulator --- 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));