// Uncomment this for debugging...
//#define DEBUG
-//#define DEBUGFOO // Various tool debugging...
+//#define DEBUGFOO // Various tool debugging...
//#define DEBUGTP // Toolpalette debugging...
#include "drawingview.h"
// snap to the one before it. So we add half of the grid spacing to the
// point, then divide by it so that we can remove the fractional part, then
// multiply it back to get back to the correct answer.
- point += gridSpacing / 2.0; // *This* adds to Z!!!
- point /= gridSpacing;
- point.x = floor(point.x);//need to fix this for negative numbers...
- point.y = floor(point.y);
- point.z = 0; // Make *sure* Z doesn't go anywhere!!!
- point *= gridSpacing;
+ if (event->buttons() & Qt::LeftButton)
+ {
+ point += gridSpacing / 2.0; // *This* adds to Z!!!
+ point /= gridSpacing;
+ point.x = floor(point.x);//need to fix this for negative numbers...
+ point.y = floor(point.y);
+ point.z = 0; // Make *sure* Z doesn't go anywhere!!!
+ point *= gridSpacing;
+ }
#endif
//we should keep track of the last point here and only pass this down *if* the point
//changed...