From fae2af36fcfa9e6ea009ca6704556b5126d1112e Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Mon, 7 Jun 2010 07:24:37 +0000 Subject: [PATCH] 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. --- aegisub/src/video_display.h | 2 +- aegisub/src/visual_tool_rotatez.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/aegisub/src/video_display.h b/aegisub/src/video_display.h index 79761152e..ce8f4300b 100644 --- a/aegisub/src/video_display.h +++ b/aegisub/src/video_display.h @@ -56,7 +56,7 @@ struct VideoState { int y; int w; 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 diff --git a/aegisub/src/visual_tool_rotatez.cpp b/aegisub/src/visual_tool_rotatez.cpp index d30a1a4e3..1346db302 100644 --- a/aegisub/src/visual_tool_rotatez.cpp +++ b/aegisub/src/visual_tool_rotatez.cpp @@ -144,7 +144,7 @@ void VisualToolRotateZ::Draw() { glPopMatrix(); // Draw line to mouse - if (!dragging && !curFeature) { + if (!dragging && !curFeature && video.x > INT_MIN && video.y > INT_MIN) { SetLineColour(colour[0]); DrawLine(dx,dy,video.x,video.y); }