Don't draw the rotation pivot if there is no angle.

This commit is contained in:
David Capello 2012-01-05 22:03:06 -03:00
parent ed6090bc36
commit d4cb85f7a1

View File

@ -92,7 +92,7 @@ HandleType TransformHandles::getHandleAtPoint(Editor* editor, const gfx::Point&
}
// Check if the cursor is in the pivot
if (getPivotHandleBounds(editor, transform, corners).contains(pt))
if (angle != 0 && getPivotHandleBounds(editor, transform, corners).contains(pt))
return PivotHandle;
return NoHandle;
@ -140,7 +140,7 @@ void TransformHandles::drawHandles(Editor* editor, const gfx::Transformation& tr
}
// Draw the pivot
{
if (angle != 0) {
gfx::Rect pivotBounds = getPivotHandleBounds(editor, transform, corners);
SkinTheme* theme = static_cast<SkinTheme*>(CurrentTheme::get());
BITMAP* gfx = theme->get_part(PART_PIVOT_HANDLE);