Corrected loading of images: we need the parent size to compute initial object size

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73579 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2013-02-28 17:23:09 +00:00
parent a75b6712bd
commit 914a4e23e4
4 changed files with 123 additions and 75 deletions

View File

@@ -438,9 +438,6 @@ void wxRichTextCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
dc.SetFont(GetFont());
// Paint the background
PaintBackground(dc);
wxRect drawingArea(GetUpdateRegion().GetBox());
drawingArea.SetPosition(GetUnscaledPoint(GetLogicalPoint(drawingArea.GetPosition())));
drawingArea.SetSize(GetUnscaledSize(drawingArea.GetSize()));
@@ -459,6 +456,9 @@ void wxRichTextCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
SetupScrollbars();
}
// Paint the background
PaintBackground(dc);
wxRect clipRect(availableSpace);
clipRect.x += GetBuffer().GetLeftMargin();
clipRect.y += GetBuffer().GetTopMargin();
@@ -3262,7 +3262,7 @@ void wxRichTextCtrl::Replace(long from, long to,
SetSelection(from, to);
wxRichTextAttr attr = GetDefaultStyle();
wxRichTextAttr attr(GetDefaultStyle());
DeleteSelectedContent();