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:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user