mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-10-11 06:01:28 +08:00
Don't leak memory on the dc
This commit is contained in:
parent
dc0bc0bbdb
commit
e82238266c
@ -83,15 +83,15 @@ AboutDialogLogo::AboutDialogLogo(wxWindow* parent) :
|
|||||||
|
|
||||||
void AboutDialogLogo::repaint(wxPaintEvent& event)
|
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 size {this->GetSize()};
|
||||||
const auto logo_w {this->logo.GetWidth()};
|
const auto logo_w {this->logo.GetWidth()};
|
||||||
const auto logo_h {this->logo.GetHeight()};
|
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();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user