]> git.tdb.fi Git - r2c2.git/commitdiff
Reverse pointer y coordinate in manipulator
authorMikko Rasa <tdb@tdb.fi>
Tue, 14 Dec 2010 21:27:04 +0000 (21:27 +0000)
committerMikko Rasa <tdb@tdb.fi>
Tue, 14 Dec 2010 21:27:04 +0000 (21:27 +0000)
source/designer/manipulator.cpp

index 720309bd8dc4b773374b7120fd09195685464d91..b41b29eeac9ac6e6562df825824f316a817fa3f7 100644 (file)
@@ -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));