mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-06 05:56:37 +08:00
Don't leak memory on the dc
This commit is contained in:
parent
7190759d9e
commit
314cc26f27
@ -83,15 +83,15 @@ AboutDialogLogo::AboutDialogLogo(wxWindow* parent) :
|
||||
|
||||
void AboutDialogLogo::repaint(wxPaintEvent& event)
|
||||
{
|
||||
auto dc { new wxPaintDC(this) };
|
||||
auto dc = wxPaintDC(this);
|
||||
|
||||
dc->SetBackgroundMode(wxPENSTYLE_TRANSPARENT);
|
||||
dc.SetBackgroundMode(wxPENSTYLE_TRANSPARENT);
|
||||
|
||||
const auto size {this->GetSize()};
|
||||
const auto logo_w {this->logo.GetWidth()};
|
||||
const auto logo_h {this->logo.GetHeight()};
|
||||
|
||||
dc->DrawBitmap(this->logo, (size.GetWidth() - logo_w) / 2, (size.GetHeight() - logo_h) / 2, 1);
|
||||
dc.DrawBitmap(this->logo, (size.GetWidth() - logo_w) / 2, (size.GetHeight() - logo_h) / 2, 1);
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user