| 1524 | } |
| 1525 | |
| 1526 | void wxShape::OnSizingEndDragLeft(wxControlPoint* pt, double WXUNUSED(x), double WXUNUSED(y), int WXUNUSED(keys), int WXUNUSED(attachment)) |
| 1527 | { |
| 1528 | wxClientDC dc(GetCanvas()); |
| 1529 | GetCanvas()->PrepareDC(dc); |
| 1530 | |
| 1531 | m_canvas->ReleaseMouse(); |
| 1532 | dc.SetLogicalFunction(wxCOPY); |
| 1533 | this->Recompute(); |
| 1534 | this->ResetControlPoints(); |
| 1535 | |
| 1536 | this->Erase(dc); |
| 1537 | /* |
| 1538 | if (!pt->m_eraseObject) |
| 1539 | this->Show(false); |
| 1540 | */ |
| 1541 | |
| 1542 | this->SetSize(pt->sm_controlPointDragEndWidth, pt->sm_controlPointDragEndHeight); |
| 1543 | |
| 1544 | // The next operation could destroy this control point (it does for label objects, |
| 1545 | // via formatting the text), so save all values we're going to use, or |
| 1546 | // we'll be accessing garbage. |
| 1547 | wxShape *theObject = this; |
| 1548 | wxShapeCanvas *theCanvas = m_canvas; |
| 1549 | bool eraseIt = pt->m_eraseObject; |
| 1550 | |
| 1551 | if (theObject->GetCentreResize()) |
| 1552 | theObject->Move(dc, theObject->GetX(), theObject->GetY()); |
| 1553 | else |
| 1554 | theObject->Move(dc, pt->sm_controlPointDragPosX, pt->sm_controlPointDragPosY); |
| 1555 | |
| 1556 | /* |
| 1557 | if (!eraseIt) |
| 1558 | theObject->Show(true); |
| 1559 | */ |
| 1560 | |
| 1561 | // Recursively redraw links if we have a composite. |
| 1562 | if (theObject->GetChildren().GetCount() > 0) |
| 1563 | theObject->DrawLinks(dc, -1, true); |
| 1564 | |
| 1565 | double width, height; |
| 1566 | theObject->GetBoundingBoxMax(&width, &height); |
| 1567 | theObject->GetEventHandler()->OnEndSize(width, height); |
| 1568 | |
| 1569 | if (!theCanvas->GetQuickEditMode() && eraseIt) theCanvas->Redraw(dc); |
| 1570 | } |
| 1571 | |
| 1572 | |
| 1573 |
no test coverage detected