OGL improvements

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@677 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1998-09-06 14:32:25 +00:00
parent 868a28262c
commit 2e5ed787e9
10 changed files with 99 additions and 57 deletions

View File

@@ -1056,11 +1056,11 @@ bool wxShape::AttachmentSortTest(int attachmentPoint, const wxRealPoint& pt1, co
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;
@@ -1069,7 +1069,7 @@ void wxShape::MoveLineToNewAttachment(wxDC& dc, wxLineShape *to_move,
// the user has moved the point to
bool hit = HitTest(x, y, &newAttachment, &distance);
if (!hit)
return;
return FALSE;
EraseLinks(dc);
@@ -1138,6 +1138,8 @@ void wxShape::MoveLineToNewAttachment(wxDC& dc, wxLineShape *to_move,
newOrdering.Append(to_move);
GetEventHandler()->OnChangeAttachment(newAttachment, to_move, newOrdering);
return TRUE;
}
void wxShape::OnChangeAttachment(int attachment, wxLineShape* line, wxList& ordering)
@@ -1467,15 +1469,15 @@ void wxShape::Move(wxDC& dc, double x, double y, bool display)
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)