FIX:fixed crash caused by ColorPicker not being initialized

Change-Id: Id394a68b00b28c02a682ed457a14235a2e9f7053
This commit is contained in:
tao wang 2023-04-06 20:58:59 +08:00 committed by Lane.Wei
parent 50d9dd331c
commit 82b3e92069
1 changed files with 2 additions and 1 deletions

View File

@ -914,11 +914,12 @@ void AMSMaterialsSetting::on_dpi_changed(const wxRect &suggested_rect) { this->R
ColorPicker::ColorPicker(wxWindow* parent, wxWindowID id, const wxPoint& pos /*= wxDefaultPosition*/, const wxSize& size /*= wxDefaultSize*/)
{
wxWindow::Create(parent, id, pos, size);
SetSize(wxSize(FromDIP(25), FromDIP(25)));
SetMinSize(wxSize(FromDIP(25), FromDIP(25)));
SetMaxSize(wxSize(FromDIP(25), FromDIP(25)));
wxWindow::Create(parent, id, pos, size);
Bind(wxEVT_PAINT, &ColorPicker::paintEvent, this);
m_bitmap_border = create_scaled_bitmap("color_picker_border", nullptr, 25);
}