mirror of
https://git.mirrors.martin98.com/https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-14 05:45:55 +08:00
FIX: crash of PrinterFileSystem on program exiting
Change-Id: I68afa6768d4e594e7402c5aa8a3c78e363d17173
This commit is contained in:
parent
bfca09c7b2
commit
61d2d47854
@ -154,6 +154,11 @@ MediaFilePanel::MediaFilePanel(wxWindow * parent)
|
|||||||
parent->GetParent()->Bind(wxEVT_SHOW, onShowHide);
|
parent->GetParent()->Bind(wxEVT_SHOW, onShowHide);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MediaFilePanel::~MediaFilePanel()
|
||||||
|
{
|
||||||
|
SetMachineObject(nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
void MediaFilePanel::SetMachineObject(MachineObject* obj)
|
void MediaFilePanel::SetMachineObject(MachineObject* obj)
|
||||||
{
|
{
|
||||||
std::string machine = obj ? obj->dev_id : "";
|
std::string machine = obj ? obj->dev_id : "";
|
||||||
@ -269,4 +274,4 @@ MediaFileFrame::MediaFileFrame(wxWindow* parent)
|
|||||||
|
|
||||||
void MediaFileFrame::on_dpi_changed(const wxRect& suggested_rect) { m_panel->Rescale(); Refresh(); }
|
void MediaFileFrame::on_dpi_changed(const wxRect& suggested_rect) { m_panel->Rescale(); Refresh(); }
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
@ -31,6 +31,8 @@ class MediaFilePanel : public wxPanel
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MediaFilePanel(wxWindow * parent);
|
MediaFilePanel(wxWindow * parent);
|
||||||
|
|
||||||
|
~MediaFilePanel();
|
||||||
|
|
||||||
void SetMachineObject(MachineObject * obj);
|
void SetMachineObject(MachineObject * obj);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user