return FALSE;
}
-void wxShape::MoveLineToNewAttachment(wxDC& dc, wxLineShape *to_move,
+bool wxShape::MoveLineToNewAttachment(wxDC& dc, wxLineShape *to_move,
double x, double y)
{
if (!GetAttachmentMode())
- return;
+ return FALSE;
int newAttachment, oldAttachment;
double distance;
// the user has moved the point to
bool hit = HitTest(x, y, &newAttachment, &distance);
if (!hit)
- return;
+ return FALSE;
EraseLinks(dc);
newOrdering.Append(to_move);
GetEventHandler()->OnChangeAttachment(newAttachment, to_move, newOrdering);
+
+ return TRUE;
}
void wxShape::OnChangeAttachment(int attachment, wxLineShape* line, wxList& ordering)
double old_x = m_xpos;
double old_y = m_ypos;
- m_xpos = x; m_ypos = y;
-
if (!GetEventHandler()->OnMovePre(dc, x, y, old_x, old_y, display))
{
- m_xpos = old_x;
- m_ypos = old_y;
+// m_xpos = old_x;
+// m_ypos = old_y;
return;
}
+ m_xpos = x; m_ypos = y;
+
ResetControlPoints();
if (display)