Only draw the line to the cursor in the rotatez tool if the cursor is over the video display.

Originally committed to SVN as r4457.
This commit is contained in:
Thomas Goyne 2010-06-07 07:24:37 +00:00
parent 83e35ac63d
commit fae2af36fc
2 changed files with 2 additions and 2 deletions

View file

@ -56,7 +56,7 @@ struct VideoState {
int y; int y;
int w; int w;
int h; int h;
VideoState() : x(-1), y(-1), w(-1), h(-1) { } VideoState() : x(INT_MIN), y(INT_MIN), w(INT_MIN), h(INT_MIN) { }
}; };
/// @class VideoDisplay /// @class VideoDisplay

View file

@ -144,7 +144,7 @@ void VisualToolRotateZ::Draw() {
glPopMatrix(); glPopMatrix();
// Draw line to mouse // Draw line to mouse
if (!dragging && !curFeature) { if (!dragging && !curFeature && video.x > INT_MIN && video.y > INT_MIN) {
SetLineColour(colour[0]); SetLineColour(colour[0]);
DrawLine(dx,dy,video.x,video.y); DrawLine(dx,dy,video.x,video.y);
} }