X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/67d54b58cb92e83364b39c7534079c3699b9b6ea..a4fd44528a1bca5c4df4736e9060b1ff676d43a7:/contrib/src/ogl/canvas.cpp diff --git a/contrib/src/ogl/canvas.cpp b/contrib/src/ogl/canvas.cpp index aa04b2d01c..755510eb83 100644 --- a/contrib/src/ogl/canvas.cpp +++ b/contrib/src/ogl/canvas.cpp @@ -68,9 +68,15 @@ BEGIN_EVENT_TABLE(wxShapeCanvas, wxScrolledWindow) EVT_MOUSE_EVENTS(wxShapeCanvas::OnMouseEvent) END_EVENT_TABLE() +wxChar* wxShapeCanvasNameStr = wxT("shapeCanvas"); + // Object canvas -wxShapeCanvas::wxShapeCanvas(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style): - wxScrolledWindow(parent, id, pos, size, style) +wxShapeCanvas::wxShapeCanvas(wxWindow *parent, wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name): + wxScrolledWindow(parent, id, pos, size, style, name) { m_shapeDiagram = NULL; m_dragState = NoDragging; @@ -92,10 +98,11 @@ void wxShapeCanvas::OnPaint(wxPaintEvent& event) PrepareDC(dc); + dc.SetBackground(wxBrush(GetBackgroundColour(), wxSOLID)); dc.Clear(); - if (GetDiagram()) - GetDiagram()->Redraw(dc); + if (GetDiagram()) + GetDiagram()->Redraw(dc); } void wxShapeCanvas::OnMouseEvent(wxMouseEvent& event)